Problem installing matplotlib

Hi,

I run Mac OS X 10.6.4 with the official Python 2.6.3 distribution. I have already installed NumPy ver 1.4.1.

I downloaded and unzipped the matplotlib-1.0.0.tar.gz from the SourceForge site.

When I enter the command :
python setup.py install

It finally gives me the following error right at the end of a huge chunk of output:

lipo: can't figure out the architecture type of: /var/folders/mC/mC4L2rRBGEChqn7bv1iNd++++TI/-Tmp-//cc0Tc9za.out
error: command 'gcc-4.0' failed with exit status 1

Any help here would be much appreciated.

Thanks,
Joses

Joses:

gcc-4.2 is the default compiler for 10.6 - I wonder if you need to upgrade your dev tools? Xcode 3.2.2 is available for download (free with registration) from Apple.

-Jeff

ยทยทยท

On 8/25/10 3:53 AM, Joses Ho wrote:

Hi,

I run Mac OS X 10.6.4 with the official Python 2.6.3 distribution. I have already installed NumPy ver 1.4.1.

I downloaded and unzipped the matplotlib-1.0.0.tar.gz from the SourceForge site.

When I enter the command :
python setup.py install

It finally gives me the following error right at the end of a huge chunk of output:

lipo: can't figure out the architecture type of: /var/folders/mC/mC4L2rRBGEChqn7bv1iNd++++TI/-Tmp-//cc0Tc9za.out
error: command 'gcc-4.0' failed with exit status 1

Any help here would be much appreciated.

Thanks,
Joses

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

2010/8/25 Jeff Whitaker <jswhit@...146...>:

gcc-4.2 is the default compiler for 10.6 - I wonder if you need to
upgrade your dev tools? Xcode 3.2.2 is available for download (free
with registration) from Apple.

No, he's using Python.org Python I believe, and that was compiled with
gcc-4.0. So distutils picks up gcc-4.0, and that is correct.

Joses,
can you give some more lines of the output, or post the complete log
in some pastebin? Please give the output starting from the offending
gcc call at least.

I just do not recall atm what the problem is people have when coming
with this issue, so please help me a little :wink:

python setup.py build (or install) is a good approach, it gives you
more control than make.osx. Be aware of that nevertheless the
official approach others on this list will recommend seems to be
make.osx (sorry John), and most people use that. But make.osx afaik
**installs libraries in your /usr/local directory without asking you
if you want that**, if you do not take special care before (John,
please correct me if I'm wrong here! But it is what I remember from
my glimpse into make.osx). Bear that in mind. I believe it's better
to compile the libs (like freetype and pnglib) yourself where you know
what you're doing.

So, have you compiled at all and if yes using which compiler freetype2
and libpng 1.4? The records of this list are outdated in that respect
that *no* additional tuning is necessary with mpl 1.0 now to use
libpng 1.4 instead of the older 1.2.

When mpl setup.py starts there is a section between ====== lines, can
you please post also that.

Ah, and for sure you should modify your setupext.py, search for
'darwin' and add in the dictionary entry you will find, '/usr/local'
to the list of the dict value for the key 'darwin'. Then the libs
installed will be found. Before this is unlikely.

Friedrich