Question: I want to install PIL on Mavericks using pip but get this error.

```
_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
         ^
1 error generated.
error: command 'cc' failed with exit status 1

```

My Command Line Tools are installed and up to date and every hint I found didn't help.
How can I get this to compile?

EDIT: I just checked, freetype is also already installed via homebrew

Answer: 
This is caused by a change in the headers of freetype >= 2.1.5. PIL is not using the correct documented way to include the freetype headers, which causes the build to fail now that freetype finally removed the long-deprecated way of including the headers. This problem is documented right at the top of <http://freetype.sourceforge.net/freetype2/docs/tutorial/step1.html>:

> 
> NOTE: Starting with FreeType 2.1.6, the old header file inclusion scheme is no longer supported. This means that you now get an error if you do something like the following:
> 
> 
> #include <freetype/freetype.h>  
> 
> #include <freetype/ftglyph.h>
> 
> 
> 

Please take this problem upstream to the developers of PIL and advise them to use the documented way of including freetype headers:

`#include <ft2build.h>`  

`#include FT_ERRORS_H`
osx yosemite, this worked for me: 

(virtualenv)

```
$ ln -s /opt/local/include/freetype2/ /usr/local/include/freetype2
$ pip install pil==1.1.7 --allow-external pil --allow-unverified pil

```