Create an ai virtual environment:
pyton3.11 -m venv ai
Install module in virtual environment:
cd ai
python3.11 -m pip install Pillow
python3.11
Python 3.11.0rc2 (main, Jul 21 2023, 09:39:42) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
import Pillow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Pillow'
The Pillow was installed in /home/debian/.local/lib/python3.11/site-packages,why python3.11 -m pip install Pillow can't install the module Pillow inside ai/lib/python3.11/site-packages?
The import name for Pillow is
PIL. Instead ofimport Pillow, use: