打开使用cx Freeze创建的python程序时出现错误信息

时间:2014-11-19 12:53:25

标签: python python-3.x tkinter cx-freeze

我想使用python和cx_Freeze创建一个可运行的程序。

该脚本使用csv,socket,ipaddress,threading和tkinter包。 当我打开工具时,我看到下面显示的错误信息。

这是进口的问题吗?或者我做错了什么?

这就是我的设置脚本的样子:

import sys
from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["tkinter","socket","csv","struct","threading","ipaddress"], "excludes": []}


# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if (sys.platform == "win32"):
    base = "Win32GUI"


setup(
    name = "CSV Tool",
    version = "0.1",
    description = "Tool to work with data to create CSV to import with uCMDB",
    options = {"build_exe": build_exe_options},
    executables = [Executable("csv_tool.py", base = base)])

Error Message

PS:这是一个带有python3.4的win8.1 64位系统

提前感谢您提供任何帮助

1 个答案:

答案 0 :(得分:0)

正如Thomas评论的那样,来自this site的cx_Freeze设置有助于防止错误。