3

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\

Aatif Akhter
  • 2,126
  • 1
  • 25
  • 46
Martin Led
  • 65
  • 2
  • 2
  • 9

7 Answers7

2

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.

Mike
  • 21
  • 1
2

I also encountered the same error (albeit on Ubuntu 14.04). The missing module PIL is named Pillow (As said in this answer). So what I tried was (same in MacOS I think):

sudo pip3 install pillow

That translated to Windows would be:

pip.exe install pillow

Hope this helps you further.

Community
  • 1
  • 1
Carolus
  • 477
  • 4
  • 16
2

Instead of letting PyautoGUI get all the packages for you.

Install all of them individually. Then, run the pip install --upgrade _packageName_

Then run pip install pyautogui.

Hope this helps.

Pragyaditya Das
  • 1,648
  • 6
  • 25
  • 44
1

I'm happy to report that this installation error has been fixed as of version 0.9.34. All you have to do is install or update PyAutoGUI from PyPI.

Al Sweigart
  • 11,566
  • 10
  • 64
  • 92
0

try

pip uninstall pyautogui

then

pip install pyautogui
0

There is a possibility that on windows it is not rightly configured on windows path and therefore it cant find the module, to fix this try:

Control Panel \ System and Security \ System

then click: Environment Variables, and double click on path and append the directory you want to use.

full explanation on: https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/

you can also try:

Cmd:

python -m pip install < module >


git clone https://github.com/USERNAME/REPOSITORY

or

To append to PYTHONPATH:

IDE:

import sys

sys.path.append('< path >')
tinus
  • 149
  • 1
  • 7
0

you can disable your Windows protection till you install it. !pip install pyautogui

starball
  • 20,030
  • 7
  • 43
  • 238
Kan
  • 1