Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 28f993acaf
Fetching contributors…

Cannot retrieve contributors at this time

62 lines (39 sloc) 1.448 kB

Image Manipulation

Python Imaging Library

The Python Imaging Library, or PIL for short, is the library for image manipulation in Python.

It works with Python 1.5.2 and above, including 2.5, 2.6 and 2.7. Unfortunately, it doesn't work with 3.0+ yet.


PIL has a reputation of not being very straightforward to install. Listed below are installation notes on various systems.

Also, there's a fork named Pillow which is easier to install. It has good setup instructions for all platforms.

Installing on Linux

Ubuntu 11.04

Installing on Mac OS X

PIP doesn't know about the Mac OS X Freetype paths. To rectify that:

$ ln -s /usr/X11/include/freetype2 /usr/local/include/
$ ln -s /usr/X11/include/ft2build.h /usr/local/include/
$ ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/
$ ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.dylib


$ brew install libjpeg
$ pip install PIL

Installing on Windows

Jump to Line
Something went wrong with that request. Please try again.