Missing header tiffio.h installing Pillow on Mac OS X

4.7k views Asked by At

When trying to install Pillow using PIP, I get this include error:

μ ~: pip install pillow
...
libImaging/TiffDecode.h:10:10: fatal error: 'tiffio.h' file not found

#include <tiffio.h>

         ^

1 error generated.

error: command 'cc' failed with exit status 1

Does anyone know how to resolve this? I'm on OS X 10.9 and have previously been able to build Pillow on this computer.

Update: Note that I have tiffio.h on my machine at /usr/local/include/tiffio.h. After setting that directory to the C include path, I am able to successfully compile Pillow.

μ ~: C_INCLUDE_PATH=/usr/local/include
μ ~: pip install pillow
Downloading/unpacking pillow
...
Successfully installed pillow
Cleaning up...

Is this how it's supposed to be done, or is there something wrong with my machine or the installation package?

1

There are 1 answers

2
German Gomez-Herrero On BEST ANSWER

I faced the same issue and got it solved by installing libtiff using homebrew:

brew install libtiff