在Python 3.8(64位Windows)上安装PyAutoGUI时出现问题



我在安装PyAutoGUI时遇到错误,无法找到问题。我试着用pip安装它。我也使用Anaconda安装了它,但我无法将它导入Python。感谢您的帮助。

版本:Python 3.8

操作系统:Windows 10

使用的命令:pip-installpyautogui

错误:

ERROR: Command errored out with exit status 1:
command: 'C:Program FilesPython38python.exe' 'C:UsersHPAppDataRoamingPythonPython38site-packagespip' install --ignore-installed --no-user --prefix 'C:UsersHPAppDataLocalTemppip-build-env-j7d0dtw8overlay' --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 FilesPython38librunpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:Program FilesPython38librunpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:UsersHPAppDataRoamingPythonPython38site-packagespip__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main  # isort:skip # noqa
File "C:UsersHPAppDataRoamingPythonPython38site-packagespip_internalclimain.py", line 5, in <module>
import locale
File "C:Program FilesPython38liblocale.py", line 16, in <module>
import re
File "C:Program FilesPython38libre.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 FilesPython38python.exe' 'C:UsersHPAppDataRoamingPythonPython38site-packagespip' install --ignore-installed --no-user --prefix 'C:UsersHPAppDataLocalTemppip-build-env-j7d0dtw8overlay' --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,并再次安装,结果成功。非常感谢希泰什·帕蒂尔!

最新更新