1、通过几天的折腾,终于有点成效了,可是还是存在问题,把打包好的exe在其他机器上运行报错;
在此分享一篇打包exe的文章:http://www.crifan.com/use_cx_freeze_to_package_python_to_single_executable_exe/

1 import sys 2 from cx_Freeze import setup, Executable 3 #build_exe_options={ 4 # "packages":["os"], 5 # "path":"E:eclipseTest_learnsrc ina2" 6 # }; 7 #base = None 8 #if sys.platform == "win32": 9 # base = "Win32GUI" 10 setup( 11 name = "simple_PyQt4", 12 version = "0.1", 13 description = "Sample cx_Freeze PyQt4 script", 14 # options={"build_exe":build_exe_options}, 15 executables = [Executable("DEXE.py")])