cx_Freeze找不到matplotlib文件

时间:2016-05-26 23:08:38

标签: exe cx-freeze

我正在努力,并且正在努力使这项工作,但它只是工作。我正在尝试创建一个程序的可执行文件,其中包含多个导入各种模块的文件。因此,我创建了以下setup.py文件:

import cx_Freeze


executables = [cx_Freeze.Executable("MainRunner_noDC_v4.py")]


cx_Freeze.setup(
name = "EGDA",
version = "0.01",
options={"build_exe":{"packages":["numpy","os", "time","matplotlib.pyplot","matplotlib.backends", "datetime","openpyxl","mpl_toolkits.basemap"],
                      "include_files":["AcquireData_v1.py", "EarthMapping.py","CoordinateConversion_v1.py", "MainRunnerFunctions_noDC_v3.py","Regression_v2.py","Visualization_v2.py", "CheckTime_noDC_v1.py", "Example.xlsx"],
                      "excludes": ["collections.abc"]}},
description = "EGDA is a earthquake gps data analysis program",
executables = executables
)

我必须添加排除项,否则cx_Freeze不允许我构建它。

然后我得到了所有构建的内容,但访问build文件夹中的exe文件只会闪烁cmd并再次关闭它。因此我通过cmd打开了exe,因此产生了以下错误:

IOError: proj data directory not found. Expecting it at: C:\Users\Marco DS\Desktop\EGDA\build\exe.win32-2.7\library.zip\mpl_toolkits\basemap\data

我已经花了好几个小时来完成这项工作,所以非常欢迎任何帮助。谢谢!

0 个答案:

没有答案