[英]Python Module Installation Error Code 1
Over the last couple of days, I have been having been attempting to install the pyautogui module via pip. 在过去的几天里,我一直在尝试通过pip安装pyautogui模块。 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:
这是我的CMD文本的副本:
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. 首先安装
PIL
。 If you're using Py3, install Pillow
, a PIL
substitute. 如果您使用的是Py3,请安装
Pillow
( PIL
替代品)。
Press win key + R then type cmd 按Win键+ R,然后键入cmd
in command prompt type: 在命令提示符下键入:
cd xx/pythonxx/scripts
# xx represents your python directory eg C:/python34/script
cd xx/pythonxx/scripts
#xx代表您的python目录,例如C:/python34/script
pip install pillow
# for python 3xx versions pip install pillow
#适用于python 3xx版本
pip install pil
# for python 2xx versions pip install pil
#适用于python 2xx版本
pip install pyautogui
# this should work now pip install pyautogui
#现在应该可以工作了
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: 我在尝试在Windows 7上为Python 3.4安装
pyautogui
遇到了相同的问题。最后通过执行以下操作设法使其正常工作:
easy_install.exe Pillow
pip install pyautogui
Hope this helps others as well. 希望这对其他人也有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.