Installing matplotlib from source on Snow Leopard

Hi,

I’m having trouble with my built-from-source installation of matplotlib on Snow Leopard (I also tried installing from the .dmg file, but that install failed – see below for details).

I downloaded:

matplotlib-1.0.0.tar.gz

and then built and installed:

tar xvzf matplotlib-1.0.0.tar.gz

cd matplotlib-1.0.0

python setup.py build

python setup.py install

Then tried using pylab:

cd

python

Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)

[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

Type “help”, “copyright”, “credits” or “license” for more information.

import pylab

Traceback (most recent call last):

File “”, line 1, in

File “/Library/Python/2.6/site-packages/pylab.py”, line 1, in

from matplotlib.pylab import *

File “/Library/Python/2.6/site-packages/matplotlib/pylab.py”, line 216, in

from matplotlib import mpl # pulls in most modules

File “/Library/Python/2.6/site-packages/matplotlib/mpl.py”, line 2, in

from matplotlib import axis

File “/Library/Python/2.6/site-packages/matplotlib/axis.py”, line 10, in

import matplotlib.font_manager as font_manager

File “/Library/Python/2.6/site-packages/matplotlib/font_manager.py”, line 52, in

from matplotlib import ft2font

ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib/ft2font.so, 2): Symbol not found: _FT_Attach_File

Referenced from: /Library/Python/2.6/site-packages/matplotlib/ft2font.so

Expected in: flat namespace

in /Library/Python/2.6/site-packages/matplotlib/ft2font.so

I’ve seen both of these problems listed elsewhere, but no solution posted:

http://www.mailinglistarchive.com/html/matplotlib-users@lists.sourceforge.net/2010-09/msg00091.html

Any help is greatly appreciated.

Here’s information on my environment:

Mac OS X 10.6.4

uname -a

Darwin My-MacBook-Pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386

I was building from source because I was not able to install from the DMG installer (matplotlib-1.0.0-python.org-py2.6-macosx10.4.dmg). When I tried the .dmg installer, I got the following message:

matplotlib 1.0.0-r0 can’t be installed on this disk.

matplotlib requires System Python 2.6 to install

Thanks for your help,

James

2010/10/20 James Battat <jbattat@...1166...>:

Hi,
I'm having trouble with my built-from-source installation of matplotlib on
Snow Leopard (I also tried installing from the .dmg file, but that install
failed -- see below for details).

*SIGH* *SIGH*

YEAH, this keeps bugging us.

Please do a search in Gmane (http:/gmane.org, search for
matplotlib-users ...) for Mac OS X 10.6 or Snow Leopard and from
source or compilation or whatever you feel like.

You'll find a bunch of messages, many of them quite long, but be sure:
It's solvable!

I'll write it up somewhen and put it to the webpage if the developers
allow me for. So many ASAP thingys currently ...

Anyway, don't be frustrated by the many details, and start with the
*recent* messages, and believe them more than the old ones. In the
end, when you got a complete and non-conflicting image, compile again.
You'll also need to compile the libpng and libfreetype2 I believe.
Try to avoid or use as last rescue make.osx, it'll install old libs in
your /usr/local namespace!

Please apologise me, I'm getting tired of explaining it again and
again, sorry again, good success with your studies,
Friedrich

Don't hesitate to ask questions but I cannot explain it from the very
beginning, it'll also be wasting of storage :slight_smile:

Second: The dmg installer requires python.org Python, not Apple one.
The Apple one is said to be "whacky", but I don't know any details.
Just use python.org MacPython, where mpl dmg installer is compiled
against and should work from the very beginning. Compile if you need
svn bleeding-edge.

Third: The installer *might* still have the bug of wrong rights for
some images used in the toolbar, so if you find those, don't be
surprised. It's some missing read right in POSIX. But it might be
fixed now, though then I missed it.

···

I downloaded:
matplotlib-1.0.0.tar.gz
and then built and installed:

tar xvzf matplotlib-1.0.0.tar.gz
cd matplotlib-1.0.0
python setup.py build
python setup.py install

Then tried using pylab:

cd
python

Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import pylab

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "/Library/Python/2.6/site-packages/matplotlib/pylab.py", line 216, in
<module>
from matplotlib import mpl # pulls in most modules
File "/Library/Python/2.6/site-packages/matplotlib/mpl.py", line 2, in
<module>
from matplotlib import axis
File "/Library/Python/2.6/site-packages/matplotlib/axis.py", line 10, in
<module>
import matplotlib.font_manager as font_manager
File "/Library/Python/2.6/site-packages/matplotlib/font_manager.py", line
52, in <module>
from matplotlib import ft2font
ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib/ft2font.so,
2): Symbol not found: _FT_Attach_File
Referenced from: /Library/Python/2.6/site-packages/matplotlib/ft2font.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/matplotlib/ft2font.so
I've seen both of these problems listed elsewhere, but no solution posted:
http://www.mailinglistarchive.com/html/matplotlib-users@...563...eforge.net/2010-09/msg00091.html
Any help is greatly appreciated.
Here's information on my environment:

Mac OS X 10.6.4

uname -a

Darwin My-MacBook-Pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23
18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
I was building from source because I was not able to install from the DMG
installer (matplotlib-1.0.0-python.org-py2.6-macosx10.4.dmg). When I tried
the .dmg installer, I got the following message:
matplotlib 1.0.0-r0 can't be installed on this disk.
matplotlib requires System Python 2.6 to install
Thanks for your help,
James

Just got a little bit of spare time and looked up some words and
remembered what I wrote you.

I just want to clarify:
1) Not YOU are buggin us/me. Just the subject is keeping us writing
emails to bugged users.
2) I used this word (to bug) in the wrong sense. I looked it up now
and it was not what I intended. I meant it as a derivative from "the
bug", which is indeed a nice pun as I recognise from this.

Sorry if you're feeling a bit offended because of this, I guess I was
not in good mood,
Friedrich

2010/10/20 Friedrich Romstedt <friedrichromstedt@...287...>:

···

2010/10/20 James Battat <jbattat@...1166...>:

Hi,
I'm having trouble with my built-from-source installation of matplotlib on
Snow Leopard (I also tried installing from the .dmg file, but that install
failed -- see below for details).

*SIGH* *SIGH*

YEAH, this keeps bugging us.

Please do a search in Gmane (http:/gmane.org, search for
matplotlib-users ...) for Mac OS X 10.6 or Snow Leopard and from
source or compilation or whatever you feel like.

You'll find a bunch of messages, many of them quite long, but be sure:
It's solvable!

I'll write it up somewhen and put it to the webpage if the developers
allow me for. So many ASAP thingys currently ...

Anyway, don't be frustrated by the many details, and start with the
*recent* messages, and believe them more than the old ones. In the
end, when you got a complete and non-conflicting image, compile again.
You'll also need to compile the libpng and libfreetype2 I believe.
Try to avoid or use as last rescue make.osx, it'll install old libs in
your /usr/local namespace!

Please apologise me, I'm getting tired of explaining it again and
again, sorry again, good success with your studies,
Friedrich

Don't hesitate to ask questions but I cannot explain it from the very
beginning, it'll also be wasting of storage :slight_smile:

Second: The dmg installer requires python.org Python, not Apple one.
The Apple one is said to be "whacky", but I don't know any details.
Just use python.org MacPython, where mpl dmg installer is compiled
against and should work from the very beginning. Compile if you need
svn bleeding-edge.

Third: The installer *might* still have the bug of wrong rights for
some images used in the toolbar, so if you find those, don't be
surprised. It's some missing read right in POSIX. But it might be
fixed now, though then I missed it.

I downloaded:
matplotlib-1.0.0.tar.gz
and then built and installed:

tar xvzf matplotlib-1.0.0.tar.gz
cd matplotlib-1.0.0
python setup.py build
python setup.py install

Then tried using pylab:

cd
python

Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import pylab

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "/Library/Python/2.6/site-packages/matplotlib/pylab.py", line 216, in
<module>
from matplotlib import mpl # pulls in most modules
File "/Library/Python/2.6/site-packages/matplotlib/mpl.py", line 2, in
<module>
from matplotlib import axis
File "/Library/Python/2.6/site-packages/matplotlib/axis.py", line 10, in
<module>
import matplotlib.font_manager as font_manager
File "/Library/Python/2.6/site-packages/matplotlib/font_manager.py", line
52, in <module>
from matplotlib import ft2font
ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib/ft2font.so,
2): Symbol not found: _FT_Attach_File
Referenced from: /Library/Python/2.6/site-packages/matplotlib/ft2font.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/matplotlib/ft2font.so
I've seen both of these problems listed elsewhere, but no solution posted:
http://www.mailinglistarchive.com/html/matplotlib-users@...1544...ceforge.net/2010-09/msg00091.html
Any help is greatly appreciated.
Here's information on my environment:

Mac OS X 10.6.4

uname -a

Darwin My-MacBook-Pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23
18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
I was building from source because I was not able to install from the DMG
installer (matplotlib-1.0.0-python.org-py2.6-macosx10.4.dmg). When I tried
the .dmg installer, I got the following message:
matplotlib 1.0.0-r0 can't be installed on this disk.
matplotlib requires System Python 2.6 to install
Thanks for your help,
James

Maybe you can make use of this, it's not complete but I'll work on it tomorrow.

ESPECIALLY for the libpng there is a trick to make fat libpng.

http://vincentdavis.info/Shared/Docs/matplotlib-installation/build/html/Macosx10.6.html

Maybe you can complete the sections which are in.

Friedrich

Sorry for being negative, but it's reassuring that I took the right
decision when I gave back my macbook pro to IT and asked for a
thinkpad instead and I installed UNIX on it. You know what I did to
install matplotlib on my OpenBSD laptop?

pkg_add py-matplotlib

And after 1 minute it was up and running...

sorry!

2010/10/27 Friedrich Romstedt <friedrichromstedt@...287...>:

···

Maybe you can make use of this, it's not complete but I'll work on it tomorrow.

ESPECIALLY for the libpng there is a trick to make fat libpng.

http://vincentdavis.info/Shared/Docs/matplotlib-installation/build/html/Macosx10.6.html

Maybe you can complete the sections which are in.

Friedrich

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Just to keep in mind, there is a lot of work that goes into getting packages working for any particular distribution (which then presents to you as a seamless operation). Along with Friedrich for his efforts in improving packaging for MacOS, be sure to thank your local distro maintainers for their tireless efforts to making the *nix environments one of the best to develop in.

Ben Root

···

On Wed, Oct 27, 2010 at 4:19 PM, Pau <vim.unix@…982…> wrote:

Sorry for being negative, but it’s reassuring that I took the right

decision when I gave back my macbook pro to IT and asked for a

thinkpad instead and I installed UNIX on it. You know what I did to

install matplotlib on my OpenBSD laptop?

pkg_add py-matplotlib

And after 1 minute it was up and running…

sorry!

Hello,

I didn't mean it bad for the people at macports. I know you are
working very hard and you have all of my respect, honestly.

I was confusing, sorry. My personal problem is that somebody convinced
me about the it's-so-easy-ness of apple's products and I thought I
would give it a shot. This was for me a nightmare because I felt like
tight up when using that mac book pro.

It was not only that I found it difficult to install matplotlib, but
many other things were hard and difficult to understand... if you want
to go *your* way and not apple's way.

For instance encryption... take this as an example

http://www.aei.mpg.de/~pau/Encrypt_Users.html

In any case, again, yo have all of my respect and I thank you for
helping me out when I had the macbook pro with your effort by porting
all of that software.

Pau

2010/10/28 Benjamin Root <ben.root@...1304...>:

···

On Wed, Oct 27, 2010 at 4:19 PM, Pau <vim.unix@...982...> wrote:

Sorry for being negative, but it's reassuring that I took the right
decision when I gave back my macbook pro to IT and asked for a
thinkpad instead and I installed UNIX on it. You know what I did to
install matplotlib on my OpenBSD laptop?

pkg_add py-matplotlib

And after 1 minute it was up and running...

sorry!

Just to keep in mind, there is a lot of work that goes into getting packages
working for any particular distribution (which then presents to you as a
seamless operation). Along with Friedrich for his efforts in improving
packaging for MacOS, be sure to thank your local distro maintainers for
their tireless efforts to making the *nix environments one of the best to
develop in.

Ben Root

SORRY

DON'T USE IT FOR NOW

There was some mistake even in the freetype instructions.

I was tooo quick. I will post once I've tested everything.

cu
Friedrich

2010/10/27 Friedrich Romstedt <friedrichromstedt@...287...>:

···

Maybe you can make use of this, it's not complete but I'll work on it tomorrow.

ESPECIALLY for the libpng there is a trick to make fat libpng.

http://vincentdavis.info/Shared/Docs/matplotlib-installation/build/html/Macosx10.6.html

Maybe you can complete the sections which are in.

Friedrich