我想用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