Matplotlib Build Problem: Error C1083: Cannot open include file: 'ft2build.h'

Have you installed freetype properly? If you have, there should be a file named ft2build.h somewhere under the installation directory, and the directory where that file is found is the one that you should specify with -I. The string "GnuWin32" does not appear anywhere in the output of your build command, so it looks like you have not placed that directory in the correct include list.


This error comes about when building matplotlib on Ubuntu 10.10 also. The solution is to do:

sudo apt-get install python-dev libfreetype6-dev

Another solution for Mac OS X is to install Freetype with Homebrew.

brew install freetype