Python 无法识别Pyinstaller

Python 无法识别Pyinstaller,python,pyinstaller,Python,Pyinstaller,我能够安装pyinstaller,当我键入pyinstaller--onefile--windowed frontend.py 我得到了这个错误: pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was in

我能够安装pyinstaller,当我键入
pyinstaller--onefile--windowed frontend.py
我得到了这个错误:

pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At line:1 char:1
+ pyinstaller --onefile --windowed frontend.py
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
请帮我纠正这个错误。
谢谢

pyinstaller
应位于PATH环境变量中

  • 首先找到
    pyinstaller.exe
    的完整路径(它应该位于Python安装的
    Scripts
    目录中),然后复制完整路径

  • 然后打开命令提示符(以管理员身份)

  • 然后运行命令
    setx PATH“%PATH%;PYINSTALLER\u PATH”
    ,其中
    PYINSTALLER\u PATH
    是您复制的PYINSTALLER的完整路径

  • 然后需要重新启动命令提示符并再次运行该命令


这意味着PyInstaller不安装,请尝试: []-打开控制台/外壳/终端并在命令下写入


pip install pyinstaller

您是否使用虚拟环境(conda、pipenv等)?如果没有-创建并重新运行环境,然后重新运行代码