From: Robert K. <rk...@uc...> - 2005-06-17 00:23:42
|
Chris Barker wrote: > Hi all, > > As promised, I've been working on building my binary package for > matplotlib 0.82 for OS-X. I've got the one for Apple's python2.3 on OS-X > 10.3.* working now. I'm having a little trouble with a version for > Python 2.4. If I use: > > $ sudo python2.4 setup.py install > > It seems to work fine (Yahoo!) > > But if I use bdist_mpkg, then install the package, I get this when I try > to import matplotlib: > > >>> import matplotlib > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__init__.py", > line 509, in ? > defaultParams = { > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__init__.py", > line 245, in wrapper > ret = func(*args, **kwargs) > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__init__.py", > line 318, in _get_data_path > raise RuntimeError('Could not find the matplotlib data files') > RuntimeError: Could not find the matplotlib data files > > I suspect this is a Py2app error (or a setup.py incompatibility with > matplotlib), but I don't know where it is looking for the matplotlib > data files, so I'm not sure how to debug this. > > By the way, if I install with "setup.py install", then remove > site-packages/matplotlib, then install with the package, it works, so I > guess that means that the data files are being installed outside of > site-packages/matplotlib where would that be? Probably /System/Libraray/Frameworks/Python.framework/Versions/Current/share/... I always use the following setup.cfg when building matplotlib: [install] install-data=/usr/local You can check where the package is placing the data files by looking at matplotlib-<etc>.mpkg/Contents/Packages/matplotlib-data-<etc>.pkg/Contents/Info.plist under the IFPkgFlagDefaultLocation key. Note that this isn't quite the same as the install-data. It is usually <install-data>/share/matplotlib. At my request, matplotlib now searches /usr/local/share/matplotlib by default on OS X. -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |