Problem installing on Mac OS X

Hi

I'm trying to build matplotlib-0.87.2 on Mac OS X 10.4.5 PowerPC, but
am having problems with building the gtk gui. I have pygtk-2.8.4
installed and pygtk-demo runs without issue. However when I try to
build matplotlib using "python setup.py build" it tells me that it
needs pygtk inorder to build the gtk gui. This is however installed,
and can be imported into python without error

[ram@...1062... ram]$ python
Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import pygtk

looking at setup.py, it is checking for the existance of the gtk
module, not the pygtk module - hence the reason for the failure. What
else do I need to install to build matplotlib from source on Mac OS X?

Cheers

Adam

Adam Mercer wrote:

I'm trying to build matplotlib-0.87.2 on Mac OS X 10.4.5 PowerPC

[ram@...1062... ram]$ python
Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin

This looks like the Apple-provided version of Python. I highly recommend that you install the newer, third-party "Framework Build" Python:

Either 2.4.1 from:
http://www.undefined.org/python/

There are a bunch of packages pre-built for it at:

http://pythonmac.org/packages/

or, if you want to be on the bleeding edge, the new Universal (PPC and Intel) build:

http://homepage.mac.com/ronaldoussoren

We're just started to try to get packages built for that one. I don't know if anyone's got MPL working for it yet.

The MacPython Community is trying desperately to focus on one build of Python to support: you'll get more help with these.

Which brings up the questions: Why PyGtk? In general, PyGtk doesn't play very well with OS-X, AFAIK, most people only use PyGtk if they are using it in the context of "unixy" stuff, which means running darwinports or fink. In that case, you should install everything through fink or darwinports.

-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'm trying to build matplotlib-0.87.2 on Mac OS X 10.4.5 PowerPC

> [ram@...1062... ram]$ python
> Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin

This looks like the Apple-provided version of Python. I highly recommend
that you install the newer, third-party "Framework Build" Python:

<snip>

but surely the problem I'm experiencing is not related to the python version?

The MacPython Community is trying desperately to focus on one build of
Python to support: you'll get more help with these.

Surely the best one to focus on is that as supplied by Apple?

Which brings up the questions: Why PyGtk? In general, PyGtk doesn't play
very well with OS-X, AFAIK, most people only use PyGtk if they are using
it in the context of "unixy" stuff, which means running darwinports or
fink. In that case, you should install everything through fink or
darwinports.

Originally I installed matplotlib from darwinports which also
installed python-2.4.x which worked great. However I also need to run
ROOT which only builds on Mac OS X against a framework installation of
python, hence my trying to build matplotlib against the Apple provided
python, as the darwinports python is not a framework install.

Therefore I couldn't use a darwinports installed matplotlib and ROOT
from the same python.

Cheers

Adam

···

On 27/03/06, Christopher Barker <Chris.Barker@...259...> wrote:

Adam Mercer wrote:

but surely the problem I'm experiencing is not related to the python version?

Maybe, maybe not. However, you'll get more support for the Framework version, and be more likely to just find a pre-built one. Charlie Mode has been building them, and I've built some older versions.

The MacPython Community is trying desperately to focus on one build of
Python to support: you'll get more help with these.

Surely the best one to focus on is that as supplied by Apple?

No, it's not. If you really want to know the arguments, there's a lot of discussion on the python-mac list, but the short version is this:

We have no control over what Apples does. They have in the past: delivered broken versions, not upgraded except on major OS upgrades, and when they do upgrade , they don't preserve backward compatibility with installed modules.

There is very little cost to installing the 2.4.1 Framework build, at least if you have a decent Internet connection.

Originally I installed matplotlib from darwinports which also
installed python-2.4.x which worked great. However I also need to run
ROOT which only builds on Mac OS X against a framework installation of
python

Is ROOT using python now? cool. Does ROOT require pyGTK? IF not, you can use MPL with wxPython or TK instead. It may be easier -- I know my builds supported Tk and Wx, but not GTK.

-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...