When I try to use from PIL import ImageGrab
it gives me this error:
ModuleNotFoundError: No module named 'PIL'
I installed it with pip install pillow
and checked if it is installed with pip show pillow
. It says I have Version: 8.1.2
I am using python 3.9 and sublime text 3
In the internet I saw most people with that problem have a not maching python version with the pillow version, but mine should work as far as I understood..? ( https://pillow.readthedocs.io/en/stable/installation.html )
However its not working and I am trying to fix this since about two hours and I hope somebody can help me.
You might have different versions of python installed and pip is installing pillow for a different version.
A good way to avoid this is using python -m pip install pillow
instead of pip install pillow
.
Try to install it with pip3 install pillow
The fact is that you installed it for python2 but your are using python3;)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.