resending to the list too, fwiw.

2010/7/5 Stephen T. <obsessiv...@hotmail.com>:
> Hi, I am having trouble installing matplotlib. I have OS X 10.5 with Python
> 2.6 downloaded and installed from python.org. (10.5 came with Apple Python
> 2.5). I've also installed NumPy and SciPy for Python 2.6.

Since you are 10.5, I think your default compiler is gcc-4.0 if I'm
not very much mistaken.  Can you please verify that by issuing gcc
--version?

I had a private conversation with the "owner" of the previous thread
about OS X, and it seems that there are two ways to build matplotlib.
I personally had no luck with the prebuilt version either, but I don't
remember the issue, I think it wasn't compatible with my gcc-4.2
compiled freetype2 (I'm on 10.6).

a) Use make.osx.  This is quite easy, but you have no control over
where the libraries are installed, and if you do not log it via 2>&1 |
tee log.txt we will be unable to diagnose.  make.osx installs
libraries in your system, so be aware of this.

b) Install the libraries on your own.  This seems to be a little more
complicated, but it isn't really.  I used libpng 1.4 with a few
modifications, just a few lines in src/_png.cpp.  (You also may
already have recent enough versions through your /opt/ path.)

Sorry, I'm writing this again and again to all the users I tried to
convice of this way, but I didn't find inclination to do it properly
together with the developers on the website.

Did you compile Python 2.6 yourself?  If yes, have you made sure to
use the --enable-framework switch for configure?

> I've tried EasyInstall, svn, and dmg. The dmg expects Apple Python 2.6 so
> that's out. For the EasyInstall and svn routes I think I must be missing
> some external libraries? Below are some snippets of warnings/error messages:

It would be helpful to have information about the initial diagnostic
output of the setup.py call, but I don't know if easy_install works
that way.  The installation routine tells there what libraries are
found and if you have pkg-config it tells also the version found.

> from EasyInstall:
> $ easy_install matplotlib
>
>             matplotlib: 0.99.3
> warning: no files found matching 'MANIFEST'
> warning: no files found matching 'lib/mpl_toolkits'
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libpng12.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
> for architecture ppc

I think /opt/ installs are macports or similar?  What kind of "package
system" for Mac do you have installed?

> collect2: ld returned 1 exit status

It doesn't tell which arch it's missing.  I'm a bit confused about
this "missing architecture".  What arch does your system have?

> ld warning: duplicate dylib /opt/local/lib/libz.1.dylib

That's strange to me.

> lipo: can't open input file:
> /var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//ccWD9nm4.out (No such
> file or directory)
> error: Setup script exited with error: command 'c++' failed with exit status
> 1

This is the normal error when it failed.

> from SVN:
> $ python setup.py build
>             matplotlib: 1.0.svn

Somewhere here comes the output about the libraries and dependencies.

> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
> for architecture ppc
> collect2: ld returned 1 exit status
> ld warning: duplicate dylib /opt/local/lib/libz.1.dylib
> lipo: can't open input file:
> /var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//cc6cv190.out (No such
> file or directory)
> error: command 'c++' failed with exit status 1

This all seems the same as above.

> and in both throughout the messages there are references to "linker input
> file unused because linking not done" for
> powerpc-apple-darwin9-gcc-4.0.1 and i686-apple-darwin9-gcc-4.0.1.

I don't know, I also encountered this often, seems to be an extra
option issued by the distutils, which is not needed.

> I'd tried the EPD version also (and had it working), but then EasyInstall
> would direct me to their repositories (for which I did not have a password)
> so I could not download and install RPy2 and other modules (easily), so I
> decided to build up from individual components...

I did without EPD and 0.99.3 is working fine.

> Any advice you can provide on helping me complete the matplotlib
> installation? I think after this I will have the basics for data analysis in
> Python (with NumPy and SciPy).

Yeah.

Please be prepared that it may take a while to sort out all the issues
on our way.  But I'm sure it's worth!

Friedrich

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to