【问题标题】:When i try to use pyinstaller it claims that it's not installed, when i try to install it it claims it's already installed?当我尝试使用 pyinstaller 时它声称它没有安装,当我尝试安装它时它声称它已经安装?
【发布时间】:2019-11-01 11:04:48
【问题描述】:

所以标题说明了一切。

C:\Users\username>py -m pip install  pyinstaller
Requirement already satisfied: pyinstaller in c:\users\username\appdata\roaming\python\python37\site-packages (3.5)
Requirement already satisfied: altgraph in c:\users\username\appdata\roaming\python\python37\site-packages (from pyinstaller) (0.16.1)
Requirement already satisfied: pefile>=2017.8.1 in c:\users\username\appdata\roaming\python\python37\site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: setuptools in c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\site-packages (from pyinstaller) (40.8.0)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\users\username\appdata\roaming\python\python37\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: future in c:\users\username\appdata\roaming\python\python37\site-packages (from pefile>=2017.8.1->pyinstaller) (0.18.2)

C:\Users\username>py -m pyinstaller
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe: No module named pyinstaller

注意事项: 我使用 py 而不是 python,因为 python 由于未知原因无法工作

C:\Users\username>python
'python' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\username>py
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

只调用“pyinstaller”对 pip 也不起作用

C:\Users\username>pip
'pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\username>py -m pip

Usage:
  C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe -m pip <command> [options]
(...)

C:\Users\username>pyinstaller
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.

我想知道为什么这些东西对其他人也有不同的作用。

【问题讨论】:

  • 我已经设法解决了 'py' 问题,但 pyinstaller 无法正常工作,尽管尚未安装。

标签: python python-3.x cmd pyinstaller


【解决方案1】:

从主页https://pyinstaller.readthedocs.io/en/stable/installation.html阅读这些说明

尝试通过 pip install pyinstaller 安装。如果导致 numpy 错误,则通过 pip install pyinstaller==3.4

将 pyinstaller 版本降级到 3.4

【讨论】:

    【解决方案2】:

    如果其他人有同样的问题,安装不同版本的解决方案有效。 之后,您可以执行 pip install --upgrade pyinstaller,它将是最新的并且可以正常工作,不知道为什么...

    【讨论】:

      猜你喜欢
      • 2022-12-07
      • 2020-08-04
      • 2018-07-29
      • 2021-06-11
      • 1970-01-01
      • 2021-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多