1

Python 3.6.4

Pillow (PIL) 5.0

OS Win 7

pyscreeze 0.1.13

I'm trying to utilize the screenshot functions with pyautogui, but encountering an issue.

import pyautogui
image = pyautogui.locateOnScreen('imagepath')
print(image)

I'm receiving the following error:

File "C:\Users\a7153\AppData\Local\Programs\Python\Python36\lib\site-packages\pyscreeze__init__.py", line 315, in _screenshot_win32 im = ImageGrab.grab() NameError: name 'ImageGrab' is not defined

I've tried going to pyscreeze and directly importing from PIL (pillow) import ImageGrab, but with no luck. I've gone through the documentation and there doesn't seem to be anything on the issue. Does anyone have any suggestions?

cjonesrun
  • 146
  • 1
  • 1
  • 9
  • **UPDATE:** I was able to resolve this. The error occurred because I copied the pyautogui from one computer using python version 3.5 and transferred it to another using 3.6. By downloading the package directly to the computer using 3.6 the issue was resolved. – cjonesrun Jan 16 '18 at 13:22

0 Answers0