我正在尝试使用cx冻结编译程序,但使用重新分发包可以任何人修复第13行

时间:2015-05-13 19:49:10

标签: python cx-freeze

import cx_Freeze
import sys

base = None
if sys.platform == "win32":
    base = "Win32GUI"
build_exe_options = {
"include_msvcr": True   #skip error msvcr100.dll missing
}
executables = [cx_Freeze.Executable("Clock.pyw",base=base,icon="Icon.ico")]
cx_Freeze.setup(
    name= "Clock client",
    options = {"build_exe":  build_exe_options ,{"packages":["tkinter"],"include_files":["Icon.ico"]}},
    version = "0",
    description = "Clock program",
    executables = executables

    )

第13行应该如何格式化,因为当我尝试编译此代码时,我得到错误无效语法,并且大括号突出显示我缺少什么?

1 个答案:

答案 0 :(得分:1)

options = {"build_exe":  build_exe_options ,{"packages":["tkinter"],"include_files":["Icon.ico"]}},

此代码错误,因为您不应该使用" build_exe_options,"位。

修正:

options = {"build_exe": {"packages":["tkinter"],"include_files":["Icon.ico"]}},