python - pyinstaller 或任何 pip 包命令都不起作用
问题描述
我不断得到这个。此外,每当我尝试升级 pip 时,它就会停止并永远处于卸载状态。我该如何解决这个问题?
C:\Users\Jordan>pip install pyinstaller
Collecting pyinstaller
Using cached https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
Complete output from command "c:\program files (x86)\python37-32\python.exe" "c:\program files (x86)\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py" get_requires_for_build_wheel C:\Users\Jordan\AppData\Local\Temp\tmpb_jok3bp:
Traceback (most recent call last):
File "c:\program files (x86)\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>
main()
File "c:\program files (x86)\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\program files (x86)\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\Jordan\AppData\Local\Temp\pip-build-env-4q5xlolk\overlay\Lib\site-packages\setuptools\build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\Jordan\AppData\Local\Temp\pip-build-env-4q5xlolk\overlay\Lib\site-packages\setuptools\build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "C:\Users\Jordan\AppData\Local\Temp\pip-build-env-4q5xlolk\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 20, in <module>
from PyInstaller import __version__ as version, HOMEPATH, PLATFORM
ModuleNotFoundError: No module named 'PyInstaller'
----------------------------------------
Command ""c:\program files (x86)\python37-32\python.exe" "c:\program files (x86)\python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py" get_requires_for_build_wheel C:\Users\Jordan\AppData\Local\Temp\tmpb_jok3bp" failed with error code 1 in C:\Users\Jordan\AppData\Local\Temp\pip-install-zhgjxcsa\pyinstaller
You are using pip version 19.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
解决方案
尝试以下步骤
将 pip 从版本 19 降级到 18.1:pip install pip==18.1
现在使用以下命令安装 PyInstaller:pip install pyinstaller
安装 pyinstaller 后,您可以再次升级您的 pip:
python -m pip install --upgrade pip
推荐阅读
- microsoft-graph-api - 为 Beta GRAPH API 中的班次数据获取 Schedule.TimeCards 时出错
- unity3d - 当 SerializedProperty 有任何访问器时 Unity 自定义编辑器 NullReferenceException
- python - 按与字符串相关的列错误合并 2 个 csv 文件?
- flutter - 当我与 whatsapp 分享时,录制的语音持续时间变短
- scala - 要导入哪个库以使用 TwitterUtils.createStream 使用 scala 进行 Twitter 火花流
- capybara - 我想在 Cucumber 测试中使用 Capybara 删除特定的 cookie,并且不想使用 Webkit / Poltergeist
- typescript - 难以理解 Typescript 的分布式逻辑
- python - 在 tensorfow 中,如何从 CNN 等小型网络为 neurl 网络设置特定参数?
- javascript - 无法从javascript中的输入字段获取输入
- node.js - 将图像文件从角度传递给nodejs