Compile Matplotlib for Python on Snow Leopard
According to your error message you have missing freetype headers. Can you locate them using system search functionalities. I will not lecture on using a pre-built package since I love scratching my head and compiling from the start as well.
This solution worked for me on OSX 10.8.3:
ln -s /usr/local/include/freetype2/freetype/ /usr/include/freetype
(Credit really goes to: http://simpleyuan.blogspot.com/2012/08/matplotlib-error-mac-os-x.html)
You can also build by using
$ python setup.py build
with the following patch applied to setupext.py
Index: setupext.py===================================================================--- setupext.py (revision 7917)+++ setupext.py (working copy)@@ -334,6 +334,8 @@ module.include_dirs.extend(incdirs) module.include_dirs.append('.')+ module.include_dirs.append('/usr/local/include')+ module.include_dirs.append('/usr/local/include/freetype2') module.library_dirs.extend(libdirs) def getoutput(s):