Grant, Grant Edwards wrote: > OK, I'm on my third day of fighting with matplotlib. I'm > finally able to get py2exe to produce a "dist" directory, but > it _still_ doesn't work: > > Traceback (most recent call last): > File "surfacedit.py", line 3, in ? > File "wxmpl.pyc", line 23, in ? > File "matplotlib\__init__.pyc", line 715, in ? > File "matplotlib\__init__.pyc", line 273, in wrapper > File "matplotlib\__init__.pyc", line 360, in _get_data_path > RuntimeError: Could not find the matplotlib data files > > Here's the setup file I'm using: > > > from distutils.core import setup > import py2exe > import matplotlib > > setup(windows=[{"script":"surfacedit.py"}], > data_files=[('',['../win32/gnuplot/bin/wgnuplot.exe', > '../win32/gnuplot/bin/pgnuplot.exe', > '../win32/gnuplot/bin/wgnuplot_pipes.exe'] > ) + matplotlib.get_py2exe_datafiles()], > the above line does not look correct. I.e. the '+' in there, what is it for?
I have a folder structure of dist/lib dist/prog so this one works for me ("lib\\matplotlibdata", mpfiles), # use this line if use zipfile option if one does not use the py2exe zipfile option, which I use, then this should work matplotlib.get_py2exe_datafiles(), # or this one if you don't use the zipfile option If one uses the zipfile option then all of the matplotlib stuff is under: dist/lib and it expects to have the data stuff in dist/lib otherwise it wants it in dist > options={'py2exe': {'packages': ['matplotlib.numerix','pytz'], > 'dll_excludes': ['tcl84.dll', 'tk84.dll', > 'wxmsw26uh_vc.dll'], > 'excludes': ["Tkconstants", "Tkinter", "tcl", > '_gtkagg', '_tkagg']}} > ) > > Is there any current, correct, documentation on how to bundle a > matplotlib app? > > I don't know, but I think the setup.py I posted to this list for "embedding_in_wx4.py" is pretty accurate and at least for me it does build a matplotlib app. Werner ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users