get_version() PyInstaller Syntax Error

2019-08-05 01:04发布

I am running the latest version of python (3.3.2 32bit Intel win32) and have installed PyInstaller to compile my *.py files to *.exe executables. I compile my files via the Windows CMD (cmd.exe), but have recieved an error:

G:\PyInstaller>python pyinstaller.py prog.py
File "pyinstaller.py", line 73
print get_version()
                ^
SyntaxError: invalid syntax

Any thoughts of why this is error is occurring? Both of the programs have installed correctly without any problems. Thanks.

2条回答
该账号已被封号
2楼-- · 2019-08-05 01:13

According to the pyinstaller github page and official site Python 3 is not yet supported.

Also see the trac issue relevant to your error and the issue on supporting Python 3.

查看更多
劳资没心,怎么记你
3楼-- · 2019-08-05 01:13

This particular error is because print is a function in Python3, so trying to use it as a statement is a SyntaxError

查看更多
登录 后发表回答