尝试构建一个exe文件,但我遇到了一个我不明白的错误。我遵循了一个教程,所以除非它有错误的指示,否则我看不出有什么问题。 cmd print screen
-Code -
import cx_Freeze
executables = [cx_Freeze.Executable('Wedgie la Apple.py')]
cx_Freeze.setup(
name='Wedgie la Apple'
options={'build_exe':{'packages':['pygame'],'incude_files':['apple.png','appleIcon.png','grass.png','intro.png','rock.png','snakeBody.png','snakeHead.png','intro.wav','select.wav','music1.wav','music2.wav','music3.wav','music4.wav','nom_nom_nom1.wav','nom_nom_nom2.wav','nom_nom_nom3.wav','death_3.wav','death_4.wav','death_6.wav']}},
description = 'Wedgie la Apple - Snake Game'
executables = executables
)
答案 0 :(得分:0)
您在关键字之间缺少,
,例如name='Wedgie la Apple',
示例功能:
>>> def a(a="abc", b="cef"):
... print(a, b)
错:
>>> a(a="abcdef" b="feggsef")
File "<stdin>", line 1
a(a="abcdef" b="feggsef")
^
SyntaxError: invalid syntax
工作:
>>> a(a="abcdef", b="feggsef")
abcdef feggsef