py2exe打包matplotlib
来源:互联网 发布:大学生it培训中心 编辑:程序博客网 时间:2024/05/17 04:46
本文介绍如何使用py2exe打包matplotlib的界面程序。
py2exe的使用方法网上有许多资料,这里不细说了。重点是如何打包matplotlib,可能碰到的问题有两个,一个是字符集,就是出现错误Unicodedecode error,这个问题的解决办法是找到出错的文件,在前面加上import sys,reload(sys),sys.setdefaultencodding('utf8')之类的,网上也有很多方法,重点是一定要找到出错的文件。
第二个问题就是说import module error,在python shell中运行没问题,打包后有问题,解决办法就是没导入什么模块就导入,就可以解决。
百度py2exe matplotlib就可以获得很多信息,下面给出我的setup.py
import matplotlibimport mpl_toolkits.mplot3dimport Tkinterfrom distutils.core import setupimport py2exeincludes=['matplotlib.backends.backend_tkagg','Tkinter','numpy','mpl_toolkits.mplot3d']opts={'py2exe':{'includes' : includes,'excludes':['_tkagg','_gtkagg','tcl']}}data_files=matplotlib.get_py2exe_datafiles()setup(windows=['SA.py'],data_files=data_files,options=opts)
0 0
- py2exe打包matplotlib
- py2exe打包matplotlib和PyQt4
- Py2exe打包matplotlib库程序
- Py2exe 打包 Python项目(traits、traitsui、matplotlib)
- python py2exe打包matplotlib Could not find the matplotlib data files问题解决
- py2exe打包
- py2exe打包
- py2exe打包
- py2exe打包
- py2exe 打包
- 使用py2exe和matplotlib
- py2exe and matplotlib
- py2exe打包问题
- py2exe打包一个文件
- Py2exe打包成exe
- python--py2exe打包方法
- py2exe打包python脚本
- py2exe打包出错
- spinner
- 0.618最优分治
- WebView
- Linux中的service命令
- Android动画之Tween Animation
- py2exe打包matplotlib
- 你们是不是很缺大数据工程师?
- ListView
- leetcode 13 罗马数字转10进制
- ToggleButton和RadioButton
- 判断内存地址是否缺页
- 【Linux】Ubuntu装好之后出现插入网线被提示没有插入网线情况的解决方案
- 定义 Android 清单
- php curl使用小示例