Wednesday, September 8, 2010

How to install python PIL

Installing PIL library using easy_install is easy as always. But it has some dependencies, that are not so obvious at first. In order to have support for JPEG, PNG and Freetype we need to install those development libraries as well.
So the whole command list is as following:

> apt-get install zlib1g-dev libfreetype6-dev libjpeg-dev
> easy_install pil

After PIL installation script is finished you should check for the following lines:
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available

as you can see JPEG, ZLIB and FREETYPE support is available now.