安装pyautogui模块失败(我使用的是python 3.5 32位)

时间:2016-09-08 13:31:23

标签: pyautogui

请帮忙。我在命令提示符下键入pip install pyautogui。 这个过程开始然后失速。以下是发生的事情:

C:\Users\alexS\AppData\Local\Programs\Python\Python35-32\Scripts>pip 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 "<string>", line 1, in <module>
      File "C:\Users\alexS\AppData\Local\Temp\pip-build-1kn1qve4\pyscreeze\se
tup.py", line 6, in <module>
        version=__import__('pyscreeze').__version__,
      File "C:\Users\alexS\AppData\Local\Temp\pip-build-1kn1qve4\pyscreeze\py
screeze\__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\alexS
\AppData\Local\Temp\pip-build-1kn1qve4\pyscreeze\

C:\Users\alexS\AppData\Local\Programs\Python\Python35-32\Scripts>

2 个答案:

答案 0 :(得分:0)

首先安装Image模块:

$ pip install Image

然后再次重新安装pyautogui

这个答案是基于经验的。

答案 1 :(得分:0)

这已经在0.9.34中修复,因此您现在应该可以立即安装它。只需运行pip install -U pyautogui