0
我試圖從我的.py文件創建一個可執行文件。cx_Freeze錯誤:沒有提供命令
我這樣做:
import cx_Freeze
executables = [cx_Freeze.Executable("Cobra.py")]
cx_Freeze.setup(name="Snake Python", options={"build_exe":{"packages":["pygame","time","sys","os","random"]}}, executables = executables)
而且從Python的GUI運行。它返回後續誤差修改:在Windows 8.1和cx_Freeze-4.3.2.win32-py3.2
Traceback (most recent call last):
File "C:/Users/victor/Desktop/tcc/Jogo_Cobra/setup.py", line 5, in <module>
cx_Freeze.setup(name="Snake Python", options={"build_exe":{"packages":["pygame","time","sys","os","random"]}}, executables = executables)
File "C:\Python32\lib\site-packages\cx_Freeze\dist.py", line 365, in setup
distutils.core.setup(**attrs)
File "C:\Python32\lib\distutils\core.py", line 137, in setup
raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg)
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplies
我使用Python 3.2
感謝您的幫助!