python - 我在使用 pip 安装 pyinstaller 时遇到问题

标签 python python-3.x pyinstaller

我尝试在 Windows 上使用 pip 安装 pyinstaller,但不断遇到相同的错误。

说实话我知道从哪里开始寻找

C:\Users\t_sch\AppData\Local\Programs\Python\Python37-32\test>pip install pyinstaller
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz
  Installing build dependencies ... error
  ERROR: Complete output from command 'c:\users\t_sch\appdata\local\programs\python\python37-32\python.exe' 'c:\users\t_sch\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\t_sch\AppData\Local\Temp\pip-build-env-a9cvo8h0\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel:
  ERROR: Traceback (most recent call last):
    File "c:\users\t_sch\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "c:\users\t_sch\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "c:\users\t_sch\appdata\local\programs\python\python37-32\lib\site-packages\pip\__main__.py", line 16, in <module>
      from pip._internal import main as _main  # isort:skip # noqa
    File "c:\users\t_sch\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\__init__.py", line 4, in <module>
      import locale
    File "c:\users\t_sch\appdata\local\programs\python\python37-32\lib\locale.py", line 16, in <module>
      import re
    File "c:\users\t_sch\appdata\local\programs\python\python37-32\lib\re.py", line 143, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'
  ----------------------------------------
ERROR: Command "'c:\users\t_sch\appdata\local\programs\python\python37-32\python.exe' 'c:\users\t_sch\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\t_sch\AppData\Local\Temp\pip-build-env-a9cvo8h0\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel" failed with error code 1 in None

最佳答案

我看到您使用的是 3.7,enum34 与标准库不兼容(自 3.5 或 3.6 起)。尝试:

pip uninstall enum34

关于python - 我在使用 pip 安装 pyinstaller 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56068791/

相关文章:

python - 元组列表 : remove tuples by comparison of element if they have another identical element

python - 有人知道如何修复 unicode 错误吗?

python - 如何从 Pandas 中提取列表?

python : no module named selenium

python - Pyinstaller 在创建 exe 文件时无法导入 pylsd

python - 双掷骰子

python - 多次调用 dictConfig 是不好的做法吗?

python-3.x - 如何通过使用 pycryptodome 的 pyinstaller 构建可执行文件?

python - 使用 PyInstaller 创建的应用程序启动缓慢

python - 将具有多个列表的文本文件读取到 pandas dataframe 中,列表中的元素之间存在空格和逗号