使用py2exe和matplotlib
来源:互联网 发布:有向网络最短路径 编辑:程序博客网 时间:2024/05/20 22:41
演示使用py2exe和matplotlib.
#Used successfully in PythonXY2.7.3 with py2exe ,wxPython 2.8.12 and matplotlib 1.2.0 from distutils.core import setupimport matplotlibimport py2exe#----------------------------------------------------------------------------includes=["matplotlib","matplotlib.backends","matplotlib.figure","pylab","numpy","scipy","wx","matplotlib.backends.backend_tkagg","matplotlib.backends.backend_wxagg",]#----------------------------------------------------------------------------excludes=['_gtkagg', '_tkagg', '_agg2', '_cairo','_cocoaagg','_fltkagg','_gtk', '_gtkcairo']#----------------------------------------------------------------------------dll_excludes=['libgdk-win32-2.0-0.dll','libgobject-2.0-0.dll']#----------------------------------------------------------------------------options= {'py2exe':{ "includes" : includes,'excludes':excludes,'dll_excludes':dll_excludes}}#----------------------------------------------------------------------------data_files=matplotlib.get_py2exe_datafiles()#----------------------------------------------------------------------------#for windows program windows=[{"script": "D:\\Downloads\\wxMatPlotLib.py"},{"script": "D:\\Downloads\\test_wx.py"}]#----------------------------------------------------------------------------#for console programconsole = [{"script": "D:\\Downloads\\hello.py"}]#----------------------------------------------------------------------------setup(windows=windows, console=console,options=options, data_files=data_files)
主要是setup.py文件的编写很重要,要不然无法将python代码编译成exe可执行文件.上面是我的setup.py文件,保存于此,供以后参考.
更详细的参考见http://www.py2exe.org/index.cgi/MatPlotLib
- 使用py2exe和matplotlib
- py2exe打包matplotlib和PyQt4
- py2exe and matplotlib
- py2exe打包matplotlib
- Py2exe使用教程(三)——Py2exe和Win32ui
- Py2exe打包matplotlib库程序
- py2exe使用
- py2exe使用
- Py2exe使用
- python和py2exe中使用中文
- py2exe使用简介
- py2exe简单使用
- py2exe的使用
- py2exe使用总结
- 使用py2exe生成可执行文件
- py2exe使用记录
- Python py2exe简单使用
- Win 下使用py2exe
- Openness isn't the end, It's the beginning.
- NYOJ - 大数阶乘
- OpenStack安装步骤(图解)【2】
- Google Reader 关闭
- android源代码短彩信分析之包介绍
- 使用py2exe和matplotlib
- OpenStack安装步骤(图解)【3】
- more-effective-c++ 序列1 new和delete的测试
- 解决servlet中out.print()跳转alert框中文乱码问题
- Linux操作系统下虚拟光驱(iso)的挂载
- Mac OS X mkdir: /home/test: Operation not supported
- awk实用功能
- awk简明教程
- url参数名在有些系统环境下不能使用中文,否则Request[...]不识别