gpt4 book ai didi

python - 安装pyinstaller报错

转载 作者:太空狗 更新时间:2023-10-30 00:58:19 27 4
gpt4 key购买 nike

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

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 个命令。

最佳答案

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

$ pip install pip==18.1
$ pip --version
pip 18.1 from ...\lib\site-packages\pip (python 3.7)

然后就可以安装pyinstaller 3.4了:

$ 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

关于python - 安装pyinstaller报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54343455/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com