Installing PyAutoGUI Error in pip.exe install pyautogui

Martin Led picture Martin Led · Sep 17, 2016 · Viewed 7.3k times · Source

I have been installing PyautoGui on my WIN10 PC. But I am getting the following error, i have been getting a lot of errors jut to get this far.

i have been reinstalling python so its destination folder is in C:\Python instead of C:\Users\Home\AppData\Local\Programs\Python\Python35-32 mabye thats why ? How do i fix this ?

C:\Python\Scripts>pip.exe install pyautogui Collecting pyautogui
Using cached PyAutoGUI-0.9.33.zip Collecting pymsgbox (from pyautogui) Using cached PyMsgBox-1.0.3.zip Collecting PyTweening>=1.0.1 (from pyautogui) Using cached PyTweening-1.0.3.zip Collecting Pillow (from pyautogui) Using cached Pillow-3.3.1-cp35-cp35m-win32.whl Collecting pyscreeze (from pyautogui) Using cached PyScreeze-0.1.8.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\Home\AppData\Local\Temp\pip-build-kxm3249e\pyscreeze\setup.py", line 6, in version=import('pyscreeze').version, File "c:\users\home\appdata\local\temp\pip-build-kxm3249e\pyscreeze\pyscreeze__init__.py", line 21, in from PIL import Image ImportError: No module named 'PIL'

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Home\AppData\Local\Temp\pip-build-kxm3249e\pyscreeze\

Answer

Mike picture Mike · Sep 19, 2016

I encountered the same error message as you did. This workaround worked for me. Try these steps in order...

  1. Install PyScreeze 0.1.7.

  2. Update PyScreeze to 0.1.8.

  3. Install PyAutoGui.

I hope this helps.