测试这个才可以打包 我的PYQt matplotlib numpy 等程序
from distutils.core import setup import py2exe import matplotlib import sys import FileDialog import mpl_toolkits.mplot3d if len(sys.argv) == 1: sys.argv.append("py2exe") sys.argv.append("-q") setup( version ="1.1.1" , description = "G57 tools" , name = "g57 ", copyright = "no c ", #console= ["baobao.py"], windows = [ { "script": "showbox.py", "bitmap_resources": [(1, "log.bmp"),(2, "cc.bmp")], #"icon_resources": [(1, "5.ICO")] #"dest_base": "ceshisss", #"other_resources" } ], options = { "py2exe": { "includes": ["sip","tkFileDialog","matplotlib.backends","mpl_toolkits.mplot3d", "matplotlib.figure","numpy","matplotlib.pyplot","matplotlib","FileDialog" , "matplotlib.backends.backend_tkagg"], 'excludes':[], "compressed":1, #'packages': ['FileDialog'], "ignores":[], "optimize":1, "dll_excludes":["MSVCP90.dll",'libiomp5md.dll'], #"bundle_files": 1, # create singlefile exe "bundle_files":3, #"xref": False, #"skip_archive": True, "ascii": False, #"custom_boot_script": '', } }, data_files=matplotlib.get_py2exe_datafiles(), )