我想用cx_freeze 4.2.3来冻结一个python 3.2.2脚本。 PyQt4被源脚本使用,我不确定这是否是潜在的问题根源。在构建过程中Python崩溃。这里是命令行输出:问题与cx_freeze和python 3.2.2?
C:\ Python32 \新文件夹>蟒的setup.py建立
运行建立运行build_exe
复制Ç
:\ Python32 \ Lib \ site-packages \ cx_Freeze \ bases \ Win32GUI.exe - > build \ exe.win32-3.2 \ app.exe
复制C:\ WINDOWS \ system32 \ python32.dll - > build \ exe.win32 -3.2 \ python32.dll
Python本身崩溃在Windows在这一点上,并给出了 “发送错误报告” MS对话框:
python.exe遇到问题,需要关闭。对于由此造成的不便,我们深表歉意 。
这里是我的setup.py文件:
from cx_Freeze import setup, Executable
GUI2Exe_Target_1 = Executable(
script = "script.pyw",
initScript = None,
base = 'Win32GUI',
targetName = "app.exe",
compress = True,
copyDependentFiles = True,
appendScriptToExe = False,
appendScriptToLibrary = False,
icon = "icon.png"
)
excludes = ["pywin", "tcl", "pywin.debugger", "pywin.debugger.dbgcon",
"pywin.dialogs", "pywin.dialogs.list", "win32com.server",
"email"]
includes = ["PyQt4.QtCore","PyQt4.QtGui","win32gui","win32com","win32api","html.parser","sys","threading","datetime","time","urllib.request","re","queue","os"]
packages = []
path = []
setup(
version = "1.0",
description = "myapp",
author = "me",
author_email = "[email protected]",
name = "app",
options = {"build_exe": {"includes": includes,
"excludes": excludes,
"packages": packages,
"path": path
}
},
executables = [GUI2Exe_Target_1]
)
上我要去哪里不对任何想法?
编辑:经过一些实验后,它似乎我试图使用的图标是导致问题。如果我忽略图标设置,它会生成。
我在搜索时发现了这个主题,看看这个链接它有完整的setup.py,我试了一下,现在它工作,但需要一些调整[cxFreeze](http://wiki.wxpython.org/cx_freeze) – 2012-09-09 15:37:48