安装pyinstaller会报错

C:\Windows\system32>pip install pyinstaller

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

Collecting pyinstaller

  Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz

  Installing build dependencies ... done

  Getting requirements to build wheel ... error

  Complete output from command c:\python27\python.exe c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel c:\users\goldp\appdata\local\temp\tmpz9mkmy:

  Traceback (most recent call last):

    File "c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>

      main()

    File "c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main

      json_out['return_val'] = hook(**hook_input['kwargs'])

    File "c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in get_requires_for_build_wheel

      return hook(config_settings)

    File "c:\users\user\appdata\local\temp\pip-build-env-oljevt\overlay\Lib\site-packages\setuptools\build_meta.py", line 115, in get_requires_for_build_wheel

      return _get_build_requires(config_settings, requirements=['wheel'])

    File "c:\users\user\appdata\local\temp\pip-build-env-oljevt\overlay\Lib\site-packages\setuptools\build_meta.py", line 101, in _get_build_requires

      _run_setup()

    File "c:\users\user\appdata\local\temp\pip-build-env-oljevt\overlay\Lib\site-packages\setuptools\build_meta.py", line 85, in _run_setup

      exec(compile(code, __file__, 'exec'), locals())

    File "setup.py", line 20, in <module>

      from PyInstaller import __version__ as version, HOMEPATH, PLATFORM

  ImportError: No module named PyInstaller

这是我收到的特定错误消息。我不确定这是为什么?这是使用 pip install pyinstaller 和下面建议的所有 3 个命令。


蝴蝶不菲
浏览 196回答 3
3回答

天涯尽头无女友

确切的问题:获取构建轮子的要求...错误Philip Belemezov 的回答对我有用。以下是屏幕截图形式的问题和工作解决方案的再现,以便您更好地理解。解决方案pip install pip==18.1&nbsp;- 以管理员身份运行命令提示符,它将为您安装 pip 18.1 版,如下所示。pip install pyinstaller&nbsp;- 现在运行此命令,它将安装 module:pyinstaller,如下所示。最后一步是输入pyinstaller您的命令,如果输出类似,则表示您已成功安装 package:pyinstaller。

一只萌萌小番薯

我遇到了同样的问题并尝试了很多从互联网上获得的方法,但下面对我有用以管理员身份打开命令提示符将 pip 降级到 18.1 版&nbsp;pip install pip==18.1下载 pyinstaller 3.4 版&nbsp;pip install pyinstaller==3.4成功,这应该有效。使用验证安装pyinstaller -v
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java