繁体   English   中英

在 Python 3.8(64 位 Windows)上安装 PyAutoGUI 时遇到问题

[英]Trouble installing PyAutoGUI on Python 3.8 (64-bit Windows)

我在安装 PyAutoGUI 时遇到错误,但我找不到问题所在。 我尝试使用 pip 安装它。 我也使用 Anaconda 安装了它,但我无法将它导入 Python。 任何帮助表示赞赏。

版本:Python 3.8

操作系统:Windows 10

使用命令:pip install pyautogui

错误:

ERROR: Command errored out with exit status 1:
       command: 'C:\Program Files\Python38\python.exe' 'C:\Users\HP\AppData\Roaming\Python\Python38\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\HP\AppData\Local\Temp\pip-build-env-j7d0dtw8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
           cwd: None
      Complete output (14 lines):
      Traceback (most recent call last):
        File "C:\Program Files\Python38\lib\runpy.py", line 194, in _run_module_as_main
          return _run_code(code, main_globals, None,
        File "C:\Program Files\Python38\lib\runpy.py", line 87, in _run_code
          exec(code, run_globals)
        File "C:\Users\HP\AppData\Roaming\Python\Python38\site-packages\pip\__main__.py", line 23, in <module>
          from pip._internal.cli.main import main as _main  # isort:skip # noqa
        File "C:\Users\HP\AppData\Roaming\Python\Python38\site-packages\pip\_internal\cli\main.py", line 5, in <module>
          import locale
        File "C:\Program Files\Python38\lib\locale.py", line 16, in <module>
          import re
        File "C:\Program Files\Python38\lib\re.py", line 145, in <module>
          class RegexFlag(enum.IntFlag):
      AttributeError: module 'enum' has no attribute 'IntFlag'
      ----------------------------------------
    ERROR: Command errored out with exit status 1: 'C:\Program Files\Python38\python.exe' 'C:\Users\HP\AppData\Roaming\Python\Python38\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\HP\AppData\Local\Temp\pip-build-env-j7d0dtw8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

我认为您应该重新安装 python 安装或尝试使用不同的版本。

在 Hitesh 的回答之后,我尝试将我的 pip 版本降级到 1.2.1 并再次安装它。 非常感谢 Hitesh Patil!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM