pyinstaller或任何pip软件包命令均无效

时间:2019-12-20 06:25:30

标签: python pip pyinstaller

我不断得到这个。同样,每当我尝试升级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.

2 个答案:

答案 0 :(得分:0)

您需要将点数从18.1降级:

`pip install pip==18.1`

然后安装PyInstaller:

`pip install pyinstaller`

之后,您可以再次升级点数:

'python -m pip install --upgrade pi'

您可以查看this问题,希望您能找到解决方案

pyinstaller No module named pyinstaller。我从提到的问题中得到了这个答案

答案 1 :(得分:0)

尝试以下步骤

将点数从版本19降级到18.1:pip install pip==18.1

现在使用以下命令安装PyInstaller:pip install pyinstaller

一旦安装了pyinstaller,您可以再次升级您的pip:

python -m pip install --upgrade pip