pycharm中运行pyinstaller问题

问题遇到的现象和发生背景

想用pyinstaller打包一个py文件成为一个exe

问题相关代码,请勿粘贴截图

pyinstaller -F -w -i water.ico test.py

运行结果及报错内容

PS E:\Python\2wm> pyinstaller -F -w -i water.ico test.py
pyinstaller : 无法将“pyinstaller”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1

  • pyinstaller -F -w -i water.ico test.py
    • CategoryInfo : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

我的解答思路和尝试过的方法

1、Scripts中有pyinstaller.exe

img

2、环境变量中加载了Scripts

img

3、电脑重启。

我想要达到的结果

正常打包

这个命令也是一样的报错吗

pyinstaller -F  test.py

尝试解决方法:1.试一下在cmd中运行打包命令。
2.安装pyinstaller开发版本:pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz