From: Stephen U. <suh...@gm...> - 2007-02-03 15:06:09
|
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 |
From: Christopher B. <Chr...@no...> - 2007-02-03 21:15:50
|
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 |
From: Stephen U. <suh...@gm...> - 2007-02-05 16:14:57
|
Sorry for the forward... I wanted to make sure this made it to the list. ---------- Forwarded message ---------- From: Stephen Uhlhorn <suh...@gm...> Date: Feb 4, 2007 8:02 AM Subject: Re: [Matplotlib-users] matplotlib can't find pygtk during build To: Christopher Barker <Chr...@no...> On 2/3/07, Christopher Barker <Chr...@no...> wrote: > 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. import pygtk barfs. My python is from ActiveState (Framework) which was recommended by the scipy people. > 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. Here's the real saga. I had a working Fink installaiton of python/numpy/scipy/matplotlib until an update to scipy broke critical functions (fopen). The fix is in cvs, so this whole mess started in an attempt to use a cvs version of scipy. So I followed the instructions on the scipy site and in the link above. Python numpy, and scipy are fine, but I can't get matplotlib to work with the system. I tried wxpython2.6 first, but figure windows never got drawn on my display, even when I used pythonw. So I tried pygtk because it worked fine for me under fink and on my linux box. I thought I could build a binary pygtk with darwinports and use it in my installation... I guess not. So here we are. What to do? I think these are my options: 1) Build a mpkg of pygtk using darwinports and install it under my python. Is this possible? 2) Get wx working somehow. Where do I begin? 3) Cocoa backend? I didn't know there was one. 4) Go back to fink or darwinports and fight these problems on the scipy side. Which course do you (or anyone) recommend? Thanks- -stephen |
From: Christopher B. <Chr...@no...> - 2007-02-05 17:42:57
|
Stephen Uhlhorn wrote: > My python is from ActiveState (Framework) which > was recommended by the scipy people. I wonder why, I don't what the advantages of it are over the pythonmac version -- last I heard it did NOT support Universal binaries, but maybe that makes things a bit easier, particularly for scipy, and there is no easy way to build universal binaries from Fortran. > Here's the real saga. I had a working Fink installaiton of > python/numpy/scipy/matplotlib until an update to scipy broke critical > functions (fopen). The fix is in cvs, so this whole mess started in an > attempt to use a cvs version of scipy. You could (should) have re-built scipy inside your fink distro. > I tried wxpython2.6 first, but figure windows never got drawn on my > display, even when I used pythonw. wxPython 2.6.3, as distributed on the wxPython site and pythonmac, should work with MPL. I've lost track of whether there is a properly built binary of MPL on pythonmac at this point. Search these archives, and you'll see discussion of how to do it, or send a note to me if this one fails: http://pythonmac.org/packages/py24-fat/index.html Russell, if you're listening -- did you ever post your binary for Python2.4, wxPython2.6.3 ? > So I tried pygtk because it worked > fine for me under fink and on my linux box. I thought I could build a > binary pygtk with darwinports and use it in my installation... I guess > not. nope, PYGTK is a good option IF you want to stick with darwinports or Fink, but not if you want the more "mac native" setup. > 1) Build a mpkg of pygtk using darwinports and install it under my > python. Is this possible? not easily -- I don't think it's been done --someone correct me if I'm wrong. > 2) Get wx working somehow. Where do I begin? with the package above, the notes that should be on this list, and if you're lucky with Russell Owens' binary. If all that fails, drop me a note, either Russell or I should be able to get you going. Note that there are some yet-unresolved issues with the wx back-end with wxPython2.8, at least on OS-X, so I'd stick with 2.6.3. OH, and I've lost track, are you using Python 2.4 or 2.5? It should all work with 2.5, but I (and I think Russell) are using wxPython2.8 with Python 2.5 and wxPython2.6 with Python 2.4. > 3) Cocoa backend? I didn't know there was one. It may not have ever matured -- anyone know? > 4) Go back to fink or darwinports and fight these problems on the scipy > side. If you had Fink all working, it might be easiest to start there -- you just need to re-build scipy with all the fink tools -- that should be much like building it on Linux. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Russell E O. <ro...@ce...> - 2007-02-05 18:04:00
|
At 9:42 AM -0800 2007-02-05, Christopher Barker wrote: >Stephen Uhlhorn wrote: >>My python is from ActiveState (Framework) which >>was recommended by the scipy people. > >>Here's the real saga. I had a working Fink installaiton of >>python/numpy/scipy/matplotlib until an update to scipy broke critical >>functions (fopen). The fix is in cvs, so this whole mess started in an >>attempt to use a cvs version of scipy. > >You could (should) have re-built scipy inside your fink distro. I would like to add that I used to keep a unix/X11 build of python on my Mac in parallel with a framework build so I could test a GUI app on X11 and Aqua. (I build the stuff myself instead of using fink; I never could get comfortable with fink). In any case, I eventually gave up. Installing packages that had a GUI interface took extra work -- for the X11 python I had to temporarily hide the Aqua GUI stuff. Eventually I gave up and ditched the X11 version. But if you *only* use fink then this comment is irrelevant--they've handled it for you. >>I tried wxpython2.6 first, but figure windows never got drawn on my >>display, even when I used pythonw. > >wxPython 2.6.3, as distributed on the wxPython site and pythonmac, >should work with MPL. I've lost track of whether there is a properly >built binary of MPL on pythonmac at this point. Search these >archives, and you'll see discussion of how to do it, or send a note >to me if this one fails: > >http://pythonmac.org/packages/py24-fat/index.html > >Russell, if you're listening -- did you ever post your binary for >Python2.4, wxPython2.6.3 ? It's up. Bob Ippolito put it up shortly after he got back from vacation. -- Russell |
From: Christopher B. <Chr...@no...> - 2007-02-05 18:37:58
|
Stephen: Russell E Owen wrote: > It's up. Bob Ippolito put it up shortly after he got back from vacation. So this should work, with the Python, numpy, wxPython2.6.3 that are also there: http://pythonmac.org/packages/py24-fat/index.html -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Stephen U. <suh...@gm...> - 2007-02-05 19:05:29
|
Hmm... After the long discussion I'm trying to decide what the best route is. If what I want is simply a stable scipy/matplotlib installation (OS X), what is the best (most stable and predictable) method? BTW- What is wrong with the ActiveState python installation? It was recommended on the scipy site. -stephen On 2/5/07, Christopher Barker <Chr...@no...> wrote: > Stephen: > > Russell E Owen wrote: > > It's up. Bob Ippolito put it up shortly after he got back from vacation. > > So this should work, with the Python, numpy, wxPython2.6.3 that are also > there: > > http://pythonmac.org/packages/py24-fat/index.html > > -Chris |
From: Christopher B. <Chr...@no...> - 2007-02-05 19:47:33
|
Stephen Uhlhorn wrote: > If what I want is simply a stable scipy/matplotlib > installation (OS X), what is the best (most stable and predictable) > method? I'm very sorry to say that I don't know that there is a best. I, and others, have tried to keep the archive at pythonmac up to date, but building SciPy is still a pain in the %$$%^%, and there is no easy solution unless (until) Apple of someone puts out a Fortran compiler that makes Universal binaries. However, if you like (or don't mind) fink or darwinports, that may be the easiest way to go -- you should be able to use them to build stuff yourself if the package you want is not up to date. They don't support Universal binaries either, but that only matters if you want to re-distribute them. > BTW- What is wrong with the ActiveState python installation? It was > recommended on the scipy site. I have no idea. At one point, it didn't support Universal binaries -- that may not be true anymore, and may not matter for you anyway. There are WAY too many ways to install Python on OS-X. A while back, the MacPython community (that is, the folks on the pythonmac mailing list) decided that the Universal Framework Build, as found on pythonmac.org and python.org should be advocated as "the" way to do Python on OS-X, and the one that we would try as best we could to support with binary packages, and support on the mailing list. Fink and darwinports are other beasts altogether, and take care of themselves. I don't know what ActiveState's goal are with their build. At one point they had a package repository of some kind -- do they now? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |