如何使pyinstaller正常工作以转换文件?

问题描述

由于某种原因,我无法使pyinstaller正常工作。

我做到了:

pip install pyinstaller

后执行

pyinstaller在终端

这是我得到的错误

'pyinstaller' is not recognized as an internal or external command operable program or batch file.

我该如何解决

我正在使用:

  1. Python 3.8(来自Microsoft Store)
  2. Pyinstaller 4.0

预先感谢

解决方法

在我看来,您的环境一片混乱,也许有多个python版本。 使用以下命令检查默认的python,pip和PyInstaller模块版本以及系统路径:

where python
where pip
pip show pyinstaller
set path

pip命令应该位于python的Script子文件夹中,而pyinstaller应该位于lib \ site-packages子文件夹中。 另外,请看一下path变量:如果它不包含pyinstaller所在的文件夹,则在不指定其完整路径的情况下将无法运行它。

,

我查看了MS商店中有关python 3.8的评论,一位评论者说pyinstaller不适用于他们。因此,idk是我使用的python.exe类型,还是Windows机器有一些限制。

我还听说pyinstaller在3.5+上有错误,并且在python 2.7上工作更好