matplotlib can't find pygtk during build

I'm trying to build matplotlib with the GTK/GTKAgg backends but it
won't find my copy of pygtk:

mrhanky:/usr/local/src/matplotlib-0.87.7 uley$ sudo python setup.py build
GTK requires pygtk
GTKAgg requires pygtk
running build
running build_py
creating build
...........

I followed the python/numpy/scipy installation method here:
http://projects.scipy.org/pipermail/numpy-discussion/2007-January/025368.html

I installed pygtk (2.10.3) with mac/darwinports on my mac os 10.4
ppcmachine. I edited setupext.py to look for all the libs under
/opt/local. matplotlib seems to find libjpeg, libpng, et al, but it
can't find pygtk. How can I modify matplotlib, or how should I
install pygtk so the it builds correctly?

Thanks-
-stephen

Stephen Uhlhorn wrote:

I'm trying to build matplotlib with the GTK/GTKAgg backends but it
won't find my copy of pygtk:

mrhanky:/usr/local/src/matplotlib-0.87.7 uley$ sudo python setup.py build
GTK requires pygtk
GTKAgg requires pygtk
running build
running build_py
creating build
...........

I'm pretty sure that MPL looks for it by trying to import it. does:

import pygtk

work with the version of Python you're using?

I followed the python/numpy/scipy installation method here:
http://projects.scipy.org/pipermail/numpy-discussion/2007-January/025368.html

Those instructions are for the Universal Framework Python, that you can get from python.org and pythonmac.org/packages. That version does not play so well with Darwinports.

I installed pygtk (2.10.3) with mac/darwinports on my mac os 10.4
ppcmachine.

Are you using a darwinports python? that version of pygtk will probably only work with a darwinports python, and in that case, there may even be a darwinports matplotlib.

In general, you need to use all darwinports python stuff or no darwinports python stuff.

In theory, one could use PyGTK with he Framework build of python, using Apple's X11, but I've never seen a package for that.

Why do you want to use pygtk on a Mac? why not TK or wx, or even try the cocoa back-end, though I have no idea what state that is in.

-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