Closed BastienH closed 3 years ago
Hi, I ran into a basic issue when running pyscreenshot for the first time. I found a sample code here :
import pyscreenshot as ImageGrab im = ImageGrab.grab() im.save('path/to/image/folder/image_name.png') im.show()
quite simple. But it didn't work. apparently PIL is deprecated in favor of pillow.
To solve it, I just changed the first line in the init to:
try: from PIL import Image except ModuleNotFoundError: from pillow import Image
Maybe this can be shipped in the next version? I haven't seen that this question had history already...
Anyway thanks for this package, works great!
How did you install Pillow? Pillow use PIL for import, check the doc: https://pillow.readthedocs.io/en/stable/handbook/tutorial.html#using-the-image-class
PIL
>>> from PIL import Image
Hi, I ran into a basic issue when running pyscreenshot for the first time. I found a sample code here :
quite simple. But it didn't work. apparently PIL is deprecated in favor of pillow.
To solve it, I just changed the first line in the init to:
Maybe this can be shipped in the next version? I haven't seen that this question had history already...
Anyway thanks for this package, works great!