I installed the Pillow module within a virtual env as such:
(venv)$python -m pip install --upgrade Pillow
Collecting Pillow
Downloading Pillow-7.2.0-cp38-cp38-manylinux1_x86_64.whl (2.2 MB)
|████████████████████████████████| 2.2 MB 2.4 MB/s
Installing collected packages: Pillow
Successfully installed Pillow-7.2.0
The VS Code interpreter is the same as the terminal version:
$python --version
Python 3.8.0
$ which python
/mnt/d/github/python_dev/venv/bin/python
But when I run from Pillow import Image
I still got ModuleNotFoundError
:
$ ../venv/bin/python images.py
Traceback (most recent call last):
File "images.py", line 1, in <module>
from PIL import Image
ModuleNotFoundError: No module named 'Pillow'
I knew there are many posts regarding this topic but I'm still stuck here for almost half a day. What's the best way to fix it?