python - 安装构建依赖项...使用 pip 安装 pyInstaller 时出错
问题描述
Python版本-3.7
我尝试使用 pip 安装 pyInstaller。我在 cmd 中收到以下输出和错误消息。
错误信息
Collecting pyinstaller
Using cached pyinstaller-4.0.tar.gz (3.5 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\dell\AppData\Local\Programs\Python\Python37\python.exe' 'C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\dell\AppData\Local\Temp\pip-build-env-d_vuoc7m\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:\Users\dell\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\cli\main.py", line 5, in <module>
import locale
File "C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\locale.py", line 16, in <module>
import re
File "C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\dell\AppData\Local\Programs\Python\Python37\python.exe' 'C:\Users\dell\AppData\Local\Programs\Python\Python37\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\dell\AppData\Local\Temp\pip-build-env-d_vuoc7m\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.
解决方案
执行pip uninstall enum34
并再次运行该命令。
推荐阅读
- php - 如何根据网站是否支持http或https来获取网站名称?
- c# - C# - 添加column1和column 2的值时出现listview错误
- gradle - Gradle 下载触发 Windows Defender - 如何排除在 Temp 文件夹中下载的文件
- javascript - 异步完成后如何执行另一个功能?
- python-3.x - 如何自适应地将图像分割成多个区域并为每个区域设置不同的文本方向?
- python - keras rl - dqn 模型更新
- uml - UML中的三个表的多对多关系
- node.js - MongoDB - 哪个更有效 - 文档上的嵌套数组或对另一个集合的引用
- bash - Plex 如何使用 CLI 获取声明令牌
- python - 有什么可以影响 time.sleep() 我需要更早发生的事情吗?