pyinstaller打包程序出现failed to create process

方法一:
在Python的安装路径下找到Scripts文件下的pyinstaller-script.py文件并打开,如果路径没有引号则加上引号,此种情况一般发生在pyinstaller版本较低的情况下

pyinstaller打包程序出现failed to create process
pyinstaller打包程序出现failed to create process
方法二:
如果加上引号还是不能打包文件,则在DOS命令行进入Python安装路径的Scripts文件夹 执行:python pyinstaller-script.py G:\Python\Project\Pychar\Qt5\demo5.py(把G:\Python\Project\Pychar\Qt5\demo5.py替换成自己需要打包的文件即可)

我参考的方法,使用方法一解决了自己的问题,希望这个也能帮助大家。