0

I am trying, and reeaally trying to make this work, but it just aint working. I am trying to create an executable of a program with multiple files that imports all kinds of modules. I therefore created the following setup.py file:

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
)

I had to add the excludes, as otherwise cx_Freeze wouldnt allow me to build this.

Then I get very everything built, however accessing the exe file in the build folder will only flash open the cmd and close it again. I opened the exe therefore through cmd, and it thus produced the following error:

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

I have literally tried for hours to make this work, so any help is highly welcome. Thanks!

user3604362
  • 361
  • 1
  • 5
  • 19
  • Does the sample in the cx_Freeze distribution that uses matplotlib work for you? – Anthony Tuininga May 28 '16 at 03:47
  • Nothing that uses matplotlib works for me. It seems that cx_Freeze forgets the file packages required for the exe, but I havent managed to succesfully force cx_Freeze to take them into account neither. – user3604362 May 28 '16 at 07:33
  • Hmm, the sample works for me -- well, at least it did! Perhaps you can identify in your question what version of Python and what version of matplotlib you are using? I can take a look next week once I have this information and see if the sample works with those versions. – Anthony Tuininga May 29 '16 at 03:33
  • I use python 2.7 32 bit with matplotlib 1.5.1, although basemap I had to download seperately and is version 1.0.7... – user3604362 May 29 '16 at 13:22
  • Ok. I have confirmed that I can see your problem when using matplotlib 1.5.1 -- so I have something to go on now! I'll provide an answer once there is one -- hopefully a little later on this week. – Anthony Tuininga Jun 01 '16 at 04:25

0 Answers0