west user
west user

Reputation: 41

Pyautogui Screenshot Functions return AttributeError 'module' object has no attribute

I have installed Python 3.4 and Pillow. All the other functions are working related to pyautogui only the screenshots and other image recognition things are not working.

>>> import pyautogui
>>> pyautogui.locateOnScreen('chrome.PNG')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'locateOnScreen'

same results show to screen capture function also.

In windows 7 OS

I have read the below link but non of the results worked for me Python: 'pyautogui' has no attribute 'screenshot' (Windows)

Upvotes: 2

Views: 3883

Answers (3)

sirimiri
sirimiri

Reputation: 539

i had the same issue, resolve by uninstalling pyscreeze and pyautogui and reinstall the exact version

1.) pip uninstall pyscreeze pyautogui

2.) pip install pyautogui==0.9.35

Upvotes: 0

west user
west user

Reputation: 41

If having problem with pillow module, first install pillow model through easy installation in command line

easy_install Pillow

then install the PyAutoGui via

pip install PyAutoGUI-0.9.35

All in Command Line as Administrator.

Upvotes: 0

Chamith Chathuka
Chamith Chathuka

Reputation: 605

Try Downloading the exact version by mentioning it it in pip.

pip install PyAutoGUI-0.9.35

or

pip install pyautogui==0.9.35

That worked for me.

Upvotes: 4

Related Questions