python py2exe打包matplotlib Could not find the matplotlib data files问题解决
来源:互联网 发布:js接口安全域名 备案 编辑:程序博客网 时间:2024/06/06 04:33
# !/usr/bin/env python# -*- coding:utf8 -*- """@file: setup@author: x00347195@time: 2016/5/17 11:31"""from distutils.core import setupimport py2exeimport globopts = { 'py2exe': { "includes": ["matplotlib.backends", "matplotlib.figure", "pylab", "numpy", "matplotlib.backends.backend_tkagg"], 'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg', '_fltkagg', '_gtk', '_gtkcairo', ], 'dll_excludes': ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll'] }}data_files = ["analysischanneldatatool.ico", (r'mpl-data', glob.glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\*.*')), (r'mpl-data', [r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\matplotlibrc']), (r'mpl-data\images', glob.glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\images\*.*')), (r'mpl-data\fonts', glob.glob(r'C:\Python27\Lib\site-packages\matplotlib\mpl-data\fonts\*.*'))]setup( # options=options, zipfile=None, windows=[{"script": "test.py", "icon_resources": [(1, "test.ico")]}], data_files=data_files, version='Goku 1.0', name='sqxu', options=opts,)
py2exe打包matplotlib后,打开程序提示错误Could not find the matplotlib data files,按上面修改setup.py后即可。
打包时需要添加matplotlib的一些文件路径信息,具体路径根据自己python安装的路径进行修改。
0 0
- python py2exe打包matplotlib Could not find the matplotlib data files问题解决
- py2exe打包matplotlib
- py2exe打包matplotlib和PyQt4
- Py2exe打包matplotlib库程序
- Py2exe 打包 Python项目(traits、traitsui、matplotlib)
- linux终端使用python的matplotlib模块画图出现“could not open display”问题解决
- 使用py2exe和matplotlib
- py2exe and matplotlib
- python matplotlib安装问题解决方案
- Could not find the python development headers
- anaconda 使用matplotlib画图出现 could not find or load Qt platform plugin "" 解决
- Could not find method问题解决
- python pyinstaller 打包含有matplotlib库
- python matplotlib
- Python-Matplotlib
- Python matplotlib
- python-matplotlib
- python-matplotlib
- UIProgressView进度条
- 磁盘 I/O 性能监控指标和调优方法
- git提交A时导致Submitted, Merge Pending, A依赖B(B状态为ABANDONED )
- 【数据结构】 串 YTU 2248: 2280: 找字符个数(串)
- JSP中的EL表达式(1)
- python py2exe打包matplotlib Could not find the matplotlib data files问题解决
- 架构漫谈(五):什么是软件
- PAT乙级—1028. 人口普查(20)-native
- ios 9.0获取用户位置
- 利用redis + lua解决抢红包高并发的问题
- (需要进行整理)保存的书签
- URL 和 URI 有什么不同?
- C++11中once_flag,call_once实现
- 自动驾驶与协同行驶