python - 无法通过 pip install 安装 pyautogui,出现错误 1

标签 python windows pip pyautogui

我正在尝试通过代码“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 升级了我的 pip。(当前版本是 19.0.2)

我尝试了具有管理权限的提示并输入 pip install pyautogui 但提示也给了我同样的错误:

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'

请向初学者分享您的智慧

最佳答案

尝试以管理员身份安装。

pip install pyautogui

关于python - 无法通过 pip install 安装 pyautogui,出现错误 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54624260/

相关文章:

C# 应用程序记录器

python - 没有名为 'Twisted' 的模块

python - 使用 pip 安装包时出错

python - sympy 中矩阵的按列(或按行)运算

python - LDAP Server_Down 错误

python - 在 Python 中从两个列表中查找和删除匹配项

python - 在 python pandas 中减去两个非数字数据帧

c++ - 在windows上编译c++程序

c++ - 驱动程序拒绝访问 PCI 卡

python - E : Unable to find a source package for psycopg2 or use pip with virtualenv