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

时间:2019-05-09 23:26:12

标签: python python-3.x pyinstaller

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

Tbh idek知道从哪里开始寻找

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

1 个答案:

答案 0 :(得分:0)

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

pip uninstall enum34