Over the last couple of days, I have been having been attempting to install the pyautogui module via pip. it isn't going well. I've attempted the few fixes I've seen online, but none work. I need some help. Here's a copy of my CMD text:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\FrankFritz>py -m pip install pyautogui
Collecting pyautogui
Using cached PyAutoGUI-0.9.31.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.0.0-cp35-none-win_amd64.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 "<string>", line 20, in <module>
File "C:\Users\FrankFritz\AppData\Local\Temp\pip-build-yjly5zdh\pyscreeze\setup.p
y", line 6, in <module>
version=__import__('pyscreeze').__version__,
File "C:\Users\FrankFritz\AppData\Local\Temp\pip-build-yjly5zdh\pyscreeze\pyscree
ze\__init__.py", line 21, in <module>
from PIL import Image
ImportError: No module named 'PIL'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\FrankFritz\AppD
ata\Local\Temp\pip-build-yjly5zdh\pyscreeze
Thank you in advance, it has been very frustrating.
Install PIL
first. If you're using Py3, install Pillow
, a PIL
substitute.
Press win key + R then type cmd
in command prompt type:
cd xx/pythonxx/scripts
# xx represents your python directory eg C:/python34/script
pip install pillow
# for python 3xx versions
pip install pil
# for python 2xx versions
pip install pyautogui
# this should work now
I had the same problem trying to install pyautogui
for Python 3.4 on Windows 7. Finally managed to get it working by doing the following:
easy_install.exe Pillow
pip install pyautogui
Hope this helps others as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.