Python Forum
Does python 3.7.2 work w/ PIL 5.4.1
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does python 3.7.2 work w/ PIL 5.4.1
#1
My question was explained in the title but I'll go a bit more in depth. So i downloaded pillow via the cmd using pip by typing "pip install Pillow". But my python 3.7.2 still doesn't seem to know what "ImageGrab" is. So I'm wondering if even the newest version of PIL works for an older python rather than the newer one and if so, can someone tell me which python? I would appreciate any info. Thanks in Advance.
Reply
#2
Quote:Does python 3.7.2 work w/ PIL 5.4.1
PIL stands for Python Imaging Library, so answer is of course yes.
Quote:still doesn't seem to know what "ImageGrab"
ImageGrab is available for windows and Mac, but not Linux
to use it, import as:
till doesn't seem to know what "ImageGrab"
from PIL import ImageGrab
which will of course give you an error on Linux
Reply
#3
You can use this for example: https://github.com/ponty/pyscreenshot

pyscreenshot.grab(backend='pyqt5')
Output:
<PIL.PngImagePlugin.PngImageFile image mode=RGB size=1920x1080 at 0x7F54AB131198>
If you don't want to inject an additional dependency, you can look in the code how to use one of the backends (qt, gtk, etc..).
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020