0

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.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
L1Lbg
  • 21
  • 1
  • 4

1 Answers1

0

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
scnerd
  • 5,836
  • 2
  • 21
  • 36
hoosnick
  • 136
  • 4
  • This is pretty much a link-only answer. You should probably add to it. The system or a user flagged it for deletion review. – Tim Apr 19 '22 at 20:14
  • @Tim Sorry for the low quality answer, from now on I will definitely try to answer in detail like scnerd's answer. – hoosnick Apr 20 '22 at 23:01