cx_Freeze 是在: http://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_freeze 处下载的: cx_Freeze-4.3.4-cp35-none-win32.whl
打包一切顺利,完后将 tcl86t.dll 及 tk86t.dll 复制到打包程序里 但双击 EXE 文件却无任何反应(调用 WerFault.exe )
setup.py 如下:
#!/usr/bin/env python
#coding=utf-8
from cx_Freeze import setup,Executable import sys,os
os.environ['TCL_LIBRARY'] = "C:\Python35\tcl\tcl8.6" os.environ['TK_LIBRARY'] = "C:\Python35\tcl\tk8.6"
base = 'Win32GUI' if sys.platform == 'win32' else None
executables = [Executable(script='MvApp.py',base=base,compress=True,targetName='MvApp.exe')]
build_exe_options = {'include_files':['MvApp.py'],'optimize':2}
setup( name='MvApp', version='0.1', description='Sample script', options={'build_exe':build_exe_options}, executables=executables)
1
kokutou 2016-05-03 18:44:41 +08:00 via Android
试试 nuitka 编译。
打包用 pyinstaller |
2
leavic 2016-05-04 14:20:58 +08:00
pyinstaller 才是王道
|
3
explist OP pyinstaller 需 pywin32,打包后的文件很大
|