首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装pyinstaller会显示一条错误消息

安装pyinstaller会显示一条错误消息
EN

Stack Overflow用户
提问于 2019-01-24 17:38:50
回答 7查看 22.6K关注 0票数 10
代码语言:javascript
复制
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

代码语言:javascript
复制
Command "c:\python27\python.exe c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel c:\users\user\appdata\local\temp\tmpz9mkmy" failed with error code 1 in c:\users\user\appdata\local\temp\pip-install-yd3kml\pyinstaller

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

EN

回答 7

Stack Overflow用户

发布于 2019-01-29 14:58:17

这是由issue in pip 19引起的。目前唯一的解决办法是降级到pip 18.1:

代码语言:javascript
复制
$ pip install pip==18.1
代码语言:javascript
复制
$ pip --version
pip 18.1 from ...\lib\site-packages\pip (python 3.7)

然后你可以安装pyinstaller 3.4:

代码语言:javascript
复制
$ pip install pyinstaller
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz
[...]
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
[...]
Successfully built pyinstaller
Installing collected packages: pyinstaller
Successfully installed pyinstaller-3.4
票数 8
EN

Stack Overflow用户

发布于 2019-02-01 00:36:17

确切的问题是:

正在获取生成轮子的要求...错误

菲利普·别列梅佐夫的答案对我很有效。下面是问题的再现和工作解决方案,以截图的形式让您更好地了解。

解决方案

  1. pip install pip==18.1 -以管理员身份运行命令提示符,它将为您安装pip版本18.1,如下所示。

  1. pip install pyinstaller -现在运行此命令,它将安装模块:

,如下所示。

  1. 最后一步是在命令中键入pyinstaller,如果输出类似,则表示您已成功安装了该命令

票数 3
EN

Stack Overflow用户

发布于 2021-01-17 23:22:27

我也遇到了同样的问题,并尝试了许多从互联网上获得的方法,但下面的方法对我很有效

对于版本18.1 pip install pip==18.1

  • Download pyinstaller版本3.4 pip install pyinstaller==3.4

  • Success,,使用administrator

  • Downgrade pip打开
  1. 打开命令提示符应该可以工作。使用pyinstaller -v

验证安装

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54343455

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档