missing mpl.data?

I have built some matplotlib installers for OSX, but some users are running into problems running them afterwards:

>>> from pylab import *
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2 .4/site-packages/pylab.py", line 1, in ?
     from matplotlib.pylab import *
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__i nit__.py", line 620, in ?
     defaultParams = {
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__i nit__.py", line 266, in wrapper
     ret = func(*args, **kwargs)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__i nit__.py", line 427, in _get_data_path
     raise RuntimeError('Could not find the matplotlib data files')
RuntimeError: Could not find the matplotlib data files

It appears that the mpl.fata subdirectory is missing; is there any way of ensuring that everything is included in the installer?

Thanks,
C.

···

--
Christopher J. Fonnesbeck

Population Ecologist, Marine Mammal Section
Fish & Wildlife Research Institute (FWC)
St. Petersburg, FL

Adjunct Assistant Professor
Warnell School of Forest Resources
University of Georgia
Athens, GA

T: 727.235.5570
E: chris at trichech.us

With the new setuptools support it is assumed that if you have
setuptools installed, you are going to use it. Hence, if you run
bdist with setuptools installed, the mpl-data folder will get stuck in
the wrong place. You shouldn't be able to do the reverse since you
can't run bdist_egg without setuptools. In any case, the mpl-data
folder should ALWAYS be put inside the matplotlib module folder. This
is where it is found at runtime.

···

On 1/11/06, Christopher Fonnesbeck <chris@...941...> wrote:

I have built some matplotlib installers for OSX, but some users are
running into problems running them afterwards:

>>> from pylab import *
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2 .4/site-packages/pylab.py", line 1, in ?
     from matplotlib.pylab import *
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/__i nit__.py", line 620, in ?
     defaultParams = {
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/__i nit__.py", line 266, in wrapper
     ret = func(*args, **kwargs)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/__i nit__.py", line 427, in
_get_data_path
     raise RuntimeError('Could not find the matplotlib data files')
RuntimeError: Could not find the matplotlib data files

It appears that the mpl.fata subdirectory is missing; is there any
way of ensuring that everything is included in the installer?

Thanks,
C.

--
Christopher J. Fonnesbeck

Population Ecologist, Marine Mammal Section
Fish & Wildlife Research Institute (FWC)
St. Petersburg, FL

Adjunct Assistant Professor
Warnell School of Forest Resources
University of Georgia
Athens, GA

T: 727.235.5570
E: chris at trichech.us

I've been working on this too. It's be nice if we coordinated our efforts, and got a single package up on pythonmac.org/packages.

The way I'm doing it, I'm statically linking libfreetype and libpng, so that we end up with a stand-along module that works on any OS-X (10.3 an above, anyway). I've made one for the Apple supplied 2.3 or the framework build 2.4.1.

It supports wx, tk, and Agg. It doesn't support GTK, because I don't know of a GTK package that is built outside of fink or darwinports.

Do you guys have similar goals? is it time to use Eggs? I have no particular desire to do this, but I do want a point+click installer that the folks I work with can use.

-Chris

···

On 1/11/06, Christopher Fonnesbeck <chris@...941...> wrote:

I have built some matplotlib installers for OSX.

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

The way I'm doing it, I'm statically linking libfreetype and libpng, so that we end up with a stand-along module that works on any OS-X (10.3 an above, anyway). I've made one for the Apple supplied 2.3 or the framework build 2.4.1.

It supports wx, tk, and Agg. It doesn't support GTK, because I don't know of a GTK package that is built outside of fink or darwinports.

wx has always given me headaches, so I dont bother with it anymore. Since ActivePython 2.4.2 for Mac already comes with Tk, I just try and make sure it works for TkAgg.

Do you guys have similar goals? is it time to use Eggs? I have no particular desire to do this, but I do want a point+click installer that the folks I work with can use.

I just need a portable matplotlib installer, as my MCMC module requires it. I have been generating eggs out of convenience, but I am not married to the format (in fact, I have been generating mpkg installers as well.

C.

···

On Jan 11, 2006, at 2:14 PM, Christopher Barker wrote:

--
Christopher J. Fonnesbeck

Population Ecologist, Marine Mammal Section
Fish & Wildlife Research Institute (FWC)
St. Petersburg, FL

Adjunct Assistant Professor
Warnell School of Forest Resources
University of Georgia
Athens, GA

T: 727.235.5570
E: chris at trichech.us

Christopher Fonnesbeck wrote:

wx has always given me headaches, so I dont bother with it anymore. Since ActivePython 2.4.2 for Mac already comes with Tk, I just try and make sure it works for TkAgg.

well, I need wx, so that's a given for me. I never use TK, but I want to support it.

Will the same package work for the ActivePython install as the "official unoffical" one, or do we need different installers? Also, does activestate provide a place to put packages built for their distro?

I just need a portable matplotlib installer, as my MCMC module requires it. I have been generating eggs out of convenience, but I am not married to the format (in fact, I have been generating mpkg installers as well.

I've been doing only mpkg. What advantage do Eggs have? I kind of like using the native OS-X way -- users know what to do with them.

Have you had to do any hacks to the setup.py and friends?

What do you do with libpng and libfreetype?

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

I was maintaining mpkgs here,
http://sda.iu.edu/links.shtml?prim=lab_links, but they are a little
out of date. That and the are a pain to maintain. I have been
playing with eggs lately and prefer them. I include libpng and
freetype statically in the egg, and it seems to work for me. You can
check them out here, http://euclid.uits.iupui.edu/~cmoad/mpleggs/, if
you want.

I usually stick with Apple's bundled python. I also build for wx and
tk since both come with tiger. I don't really have a preference on
numerix.

···

On 1/11/06, Christopher Barker <Chris.Barker@...259...> wrote:

Christopher Fonnesbeck wrote:
> wx has always given me headaches, so I dont bother with it anymore.
> Since ActivePython 2.4.2 for Mac already comes with Tk, I just try and
> make sure it works for TkAgg.

well, I need wx, so that's a given for me. I never use TK, but I want to
support it.

Will the same package work for the ActivePython install as the "official
unoffical" one, or do we need different installers? Also, does
activestate provide a place to put packages built for their distro?

> I just need a portable matplotlib installer, as my MCMC module requires
> it. I have been generating eggs out of convenience, but I am not
> married to the format (in fact, I have been generating mpkg installers
> as well.

I've been doing only mpkg. What advantage do Eggs have? I kind of like
using the native OS-X way -- users know what to do with them.

Have you had to do any hacks to the setup.py and friends?

What do you do with libpng and libfreetype?

Charlie Moad wrote:

I was maintaining mpkgs here:
http://sda.iu.edu/links.shtml?prim=lab_links, but they are a little
out of date.

Mine too. I almost got 0.85 built, and then you went and released 0.86!

> That and the are a pain to maintain.

Why's that? I do have a little patch to setup.py and friends to add the StaticLibs path, but that's it. I keep meaning to give that patch to John, but haven't gotten around to it.

I have been
playing with eggs lately and prefer them.

Maybe it's time to look into that. How do you install an egg?
> You can

check them out here, http://euclid.uits.iupui.edu/~cmoad/mpleggs/

will do.

I usually stick with Apple's bundled python. I also build for wx and
tk since both come with tiger.

Are you building Tiger only then? Damn, there are a lot of python+OS-X combinations to support! Also the wx version that comes with Tiger is pretty old, so I'm not sure how helpful that is. Boy, this is a pain!

I don't really have a preference on
numerix.

I try to support both Numeric and numarray, but I'll be adding numpy soon.

I really think the Python-OS-X community needs to have a fairly unified pile of packages to install. pythonmac.org is a good place for them, only because it's there. My goal is to have a MPL that works with the other packages there, so you can do one stop shopping. I'm running 10.3, so I currently build versions for Apple's 2.3 and Bob I's 2.4.1. Both of those have Numeric, numarray and wxPython packages on that site. Those need some updating, but they are there.

If the three of us could come up with a unified way to build these, and get that way into the official MPL setup.py, then it should be easy to maintain: download the latest tarball and run a script. (OK, then debug the problems, but what can you do?)

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

> That and the are a pain to maintain.

Why's that? I do have a little patch to setup.py and friends to add the
StaticLibs path, but that's it. I keep meaning to give that patch to
John, but haven't gotten around to it.

I was building against frameworks of libpng and freetype. It was the
more mac way of doing things, but took a little more effort.

> I have been
> playing with eggs lately and prefer them.

Maybe it's time to look into that. How do you install an egg?

Once you install setuptools, there is a command line tool called
easy_install. Its name doesn't do it justice. You can pass easy
install a module name and it will look on the cheeseshop. You can
pass a source url and it will download, build, and install it. You
can pass it a local directory pointing to a source. You get the
pattern. It has a lot of logic built in and does the right thing 99%
of the time.

> I usually stick with Apple's bundled python. I also build for wx and
> tk since both come with tiger.

Are you building Tiger only then? Damn, there are a lot of python+OS-X
combinations to support! Also the wx version that comes with Tiger is
pretty old, so I'm not sure how helpful that is. Boy, this is a pain!

I don't have access to 10.3.

I really think the Python-OS-X community needs to have a fairly unified
pile of packages to install. pythonmac.org is a good place for them,
only because it's there. My goal is to have a MPL that works with the
other packages there, so you can do one stop shopping. I'm running 10.3,
so I currently build versions for Apple's 2.3 and Bob I's 2.4.1. Both of
those have Numeric, numarray and wxPython packages on that site. Those
need some updating, but they are there.

I am willing to help, but osx is not my primary/only target. This is
another reason I like eggs. They work great on osx/linux/windows.