(adapted from a mail thread)
On a newly installed Ubuntu, the build bombs out with:
creating build
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/libImaging
gcc -pthread -fno-strict-aliasing -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -
IlibImaging -I/usr/include -I/usr/local/include
-I/usr/include/python2.6 -c _imaging.c -o
build/temp.linux-x86_64-2.6/_imaging.o
_imaging.c:75:20: error: Python.h: No such file or directory
...
error: command 'gcc' failed with exit status 1
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from /usr/lib/python2.6/dist-packages/PIL
--------------------------------------------------------------------
*** PIL CORE support not installed
*** TKINTER support not installed
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
*** FREETYPE2 support not installed
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest:
--- 57 tests passed.
Note that despite the errors, some tests appear to work. These tests apparently pick up a PIL version that's already installed under site-packages.
Doing a "apt-get install python-dev" fixes the local build. The tests now use the local build:
To check the build, run the selftest.py script.
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
*** TKINTER support not installed
*** JPEG support not installed
*** ZLIB (PNG/ZIP) support not installed
*** FREETYPE2 support not installed
*** LITTLECMS support not installed
--------------------------------------------------------------------
To fix the "not installed" issues, install the development libraries mentioned in the README.