我正在尝试通过代码'pip install pyautogui'安装pyautogui 但是程序总是给我一个如下错误 我从管理机构开始Visual Studio Code
================================================ ========================================
(.venv) C:\Users\USer\Desktop\pythoncode>pip install pyautogui
Collecting pyautogui
Using cached https://files.pythonhosted.org/packages/19/ef/438d80abd396fd2d124bd37c07c765f913723c54197c4c809d85c8ff5a43/PyAutoGUI-0.9.41.tar.gz
Collecting pymsgbox (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Requirement already satisfied: Pillow in c:\users\user\desktop\pythoncode\.venv\lib\site-packages (from pyautogui) (5.4.1)
Collecting pyscreeze (from pyautogui)
Using cached https://files.pythonhosted.org/packages/f3/27/073bf07400943e38b06ba40def60ec489d114fd7356c2db5a2f793454312/PyScreeze-0.1.19.tar.gz
Collecting pygetwindow (from pyautogui)
Using cached https://files.pythonhosted.org/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 "<string>", line 1, in <module>
File "C:\Users\USer\AppData\Local\Temp\pip-install-wupkdbtd\pygetwindow\setup.py", line 11, in <module>
long_description = fh.read()
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 903: illegal multibyte sequence
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USer\AppData\Local\Temp\pip-install-wupkdbtd\pygetwindow\
================================================ ========================================
我使用32位Windows和32位python 3.7
我已经用代码pip install --upgrade pip
升级了点子。(当前版本为19.0.2)
我尝试了一个具有管理权限的提示符,并键入pip install pyautogui
,但是Prompt也给了我同样的错误:
Command "python seup.py egg_info" failed with error code 1 in C:\Users\USer\AppData\Local\Temp\pip-install-e2r19eza\pygetwindow\
我已经尝试了以下链接建议的解决方案,但失败了
"pip install unroll": "python setup.py egg_info" failed with error code 1
我无法执行easy_install -U setuptools
并出现错误:
WinError 5] Access is denied : 'c:\\users\\user\\desktop\\pythoncode\\.venv\\Scripts\\easy_install.exe'
请与初学者分享您的智慧
答案 0 :(得分:1)
尝试以管理员身份安装。
pip install pyautogui