我正在尝试使用pyinstaller将我的脚本打包到一个exe中。
所有源都表明正确的语法是:pyinstaller FullClientCreator.py
当我发出这个命令时,我会得到一个语法错误:
pyinstaller FullClientCreator.py
File "C:\Users\DAVIDM~1\AppData\Local\Temp/ipykernel_7368/3509825318.py", line 1
pyinstaller FullClientCreator.py
^
SyntaxError: invalid syntax我也尝试了文件的完整路径,但仍然得到了相同的错误:
pyinstaller "D:\Projects\ZZNew Client CreatorZZ\FullClientCreator.py"
File "C:\Users\DAVIDM~1\AppData\Local\Temp/ipykernel_7368/546891165.py", line 1
pyinstaller "D:\Projects\ZZNew Client CreatorZZ\FullClientCreator.py"
^
SyntaxError: invalid syntax我完全不知道为什么会这样,所以如果有人有任何建议,我会非常感激的。
发布于 2022-03-08 21:07:20
尝试另一个shell
我不知道您在使用哪个shell,但是如果您使用python,有时它不适用于python,所以在cmd上尝试它。
pyinstaller --onefile file.py
https://stackoverflow.com/questions/71401231
复制相似问题