在安装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.
发布于 2020-10-03 15:29:41
在Hitesh回答后,我尝试将pip版本降级到1.2.1,并再次安装,但仍然有效。非常感谢Hitesh Patil!
https://stackoverflow.com/questions/64181686
复制相似问题