用pip安装pyautogui时报错,找了蛮多方法都不行,报错信息如下
(venv) D:\TestProj\test_python\am_at_python_feature>pip install pyautogui
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyautogui
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b0/f5/d7b39c588c2ef64e537471e53e5750a426a1a78dcab9e65f502f4b022704/PyAutoGUI-0.9.42.tar.gz
Collecting pymsgbox (from pyautogui)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Collecting Pillow (from pyautogui)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/40/f2/a424d4d5dd6aa8c26636969decbb3da1c01286d344e71429b1d648bccb64/Pillow-6.0.0-cp37-cp37m-win_amd64.whl
Collecting pyscreeze>=0.1.20 (from pyautogui)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/db/04/d265ef033d283df6c2d81464cd52eecaf41fb788b52d0f78593b7f44fd6c/PyScreeze-0.1.20.tar.gz
Collecting pygetwindow (from pyautogui)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/01/ed/56d4a369c6e18f6b239d9ef37b3222ba308bfebf949571b2611ff7d64f1d/PyGetWindow-0.0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\mango\AppData\Local\Temp\pip-install-hnrk6jlz\pygetwindow\
最后通过安装指定版本的pyautogui解决此问题。pip install pyautogui==0.9.35
(venv) D:\TestProj\test_python\am_at_python_feature>pip install pyautogui==0.9.35 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pyautogui==0.9.35 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/34/9b1cc150ef2aead019c7eba37594c79067fc7ad7924eb527d8106716232b/PyAutoGUI-0.9.35.zip (57kB) 100% |████████████████████████████████| 61kB 160kB/s Collecting pymsgbox (from pyautogui==0.9.35) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip Collecting PyTweening>=1.0.1 (from pyautogui==0.9.35) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip Collecting Pillow (from pyautogui==0.9.35) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/40/f2/a424d4d5dd6aa8c26636969decbb3da1c01286d344e71429b1d648bccb64/Pillow-6.0.0-cp37-cp37m-win_amd64.whl Collecting pyscreeze (from pyautogui==0.9.35) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/db/04/d265ef033d283df6c2d81464cd52eecaf41fb788b52d0f78593b7f44fd6c/PyScreeze-0.1.20.tar.gz Building wheels for collected packages: pyautogui, pymsgbox, PyTweening, pyscreeze Building wheel for pyautogui (setup.py) ... done Stored in directory: C:\Users\mango\AppData\Local\pip\Cache\wheels\bb\10\f8\e0ff5b9330fdf461b49c948f199ba66cecf4fd018549e4bd85 Building wheel for pymsgbox (setup.py) ... done Stored in directory: C:\Users\mango\AppData\Local\pip\Cache\wheels\13\11\b0\a18d6c20941fbb931611722d9f648380cb5bc2be230437a6d9 Building wheel for PyTweening (setup.py) ... done Stored in directory: C:\Users\mango\AppData\Local\pip\Cache\wheels\09\92\d8\399edb0855f5d8e05a4f7d3b45f1f690fe401d896feec1007b Building wheel for pyscreeze (setup.py) ... done Stored in directory: C:\Users\mango\AppData\Local\pip\Cache\wheels\7a\6e\b6\9557e113812bed323ec46736d1f290bae69eed0c318541c022 Successfully built pyautogui pymsgbox PyTweening pyscreeze Installing collected packages: pymsgbox, PyTweening, Pillow, pyscreeze, pyautogui Successfully installed Pillow-6.0.0 PyTweening-1.0.3 pyautogui-0.9.35 pymsgbox-1.0.6 pyscreeze-0.1.20