On Tue, Jun 30, 2009 at 9:14 AM, Michael Droettboom <mdroe@stsci.edu> wrote:
What does

 pkg-config libpng --modversion --libs --cflags


I guess I don't have pkg-config installed. Is this a requirement? I haven't had it installed before?

The pkg-config error may actually be a red herring, since matplotlib will look in /usr/local even if pkg-config fails, and it obviously found the headers or it wouldn't have gotten to the linking stage.  As the author of the pkg-config support I would like to rule that out as the problem though.

I think it's more likely that the libpng isn't being built correctly to match the kind of binary matplotlib is building.  I'm afraid that's where I hit the end of my knowledge as a non-Mac user, but I'm sure another Mac developer will chime in.

I think it's just finding the wrong version of libpng. For whatever reason, it has decided that an old version in  /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib is the proper version, despite there being a newer version in /usr/local/lib.

Is there any way I can rearrange the search path so that it finds the /usr/local/lib version?

Rick Muller