fail to install matplotlib Snow Leopard


I am trying to install matplotlib on Mac Os 10.6.x without any success.
I am on Snow Leopard w/ g++ --version i686-apple-darwin10-g+±4.2.1 (GCC) 4.2.1

I am following the steps described below:
see Python_Setup*.*

So, I install Python 2.6.6 since NumPy and SciPy and do not comply with newer Python 2.7.x releases.

I test NumPy 1.5.1rc1 and SciPy 0.8.0 and the configuration is OK for both (I get only a few failures

after using python -c ‘import numpy; numpy.test()’ & python -c ‘import scipy; scipy.test()’


When I am trying to install matplotlib 1.0.0, I get the following warnings

*/usr/include/AvailabilityMacros.h:108:14: *

warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.

but it compiles. However, when I test matplotlib 1.0.0 with a trivial module

>>> import

I get

traceback (most recent call last):

  • File “”, line 1, in *

  • File “”, line 1, in *

  • import matplotlib.pyplot as plt*

  • File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/”, line 23, in *

  • from matplotlib.figure import Figure, figaspect*

  • File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/”, line 18, in *

  • from axes import Axes, SubplotBase, subplot_class_factory*

  • File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/”, line 14, in *

  • import matplotlib.axis as maxis*

  • File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/”, line 10, in *

  • import matplotlib.font_manager as font_manager*

  • File “/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/”, line 52, in *

  • from matplotlib import ft2font*

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/, 2):
Symbol not found: _FT_Attach_File

  • Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/*

  • Expected in: dynamic lookup*

It turns out that Freetype2 feature is a required dependency for matplotlib.

I install FontForge via macports (

so that Freetype2 is enabled.

Now I clean-up and re-install everything from scratch as mentioned here…1753… ,
but the problem persists (also that user does not seem to have resolved the issue).

So, any hints on what’s wrong?
Many thanks!


2010/10/22 ny <nikos.yiotis@...287...>:

I am trying to install matplotlib on Mac Os 10.6.x without any success.
I am on Snow Leopard w/ g++ --version i686-apple-darwin10-g++-4.2.1 (GCC)

When it's not very urgent I'd like to ask you to wait until next week,
I'll write a detailed instruction how to *successfully* compile mpl on

Atm I'm busy with other things, you may want to search the archives
here so long:

I'm really sorry, please be a bit patient,

P.S.: Great that the numpy rc1 works, I was involved in building it,
this is the reason for my lack of time atm ...