'pyscreenshot module not working on run, PIL module not existing [duplicate]
I've imported the pyscreenshot module, but when I run code with it, it gives me this error:
Traceback (most recent call last):
File "myfilepaththatiwontshow", line 7, in <module>
import pyscreenshot
File "C:\Users\A\AppData\Local\Programs\Python\Python310\lib\site-packages\pyscreenshot\__init__.py", line 4, in <module>
from pyscreenshot.childproc import childprocess_backend_version
File "C:\Users\A\AppData\Local\Programs\Python\Python310\lib\site-packages\pyscreenshot\childproc.py", line 6, in <module>
from pyscreenshot.imcodec import codec
File "C:\Users\A\AppData\Local\Programs\Python\Python310\lib\site-packages\pyscreenshot\imcodec.py", line 3, in <module>
from PIL import Image
ModuleNotFoundError: No module named 'PIL'
I've checked twice and the pyscreenshot module is installed and tried running
pip install PIL
but apparently it doesn't exist.
Solution 1:[1]
According to its docs, Pillow:
Pillow is the friendly PIL fork by Alex Clark and Contributors
This library is a drop-in replacement for PIL, which is no longer available or supported. To install pillow
, use:
pip uninstall PIL
pip install pillow
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | scnerd |