Using ubuntu 13.10, python 2.7.5:
>>> import _imaging, Image
>>> from PIL import Image, ImageDraw, ImageFilter, ImageFont
>>> im =
On Mac OS X you will usually install additional software such as libjpeg or freetype with the "fink" tool, and then it ends up in "/sw". If you have installed the libraries elsewhere, you may have to tweak the "setup.py" file before building.
On Windows, you need to tweak the ROOT settings in the "setup.py" file, to make it find the external libraries. See comments in the file for details.
Make sure to build PIL and the external libraries with the same runtime linking options as was used for the Python interpreter (usually /MD, under Visual Studio).
Note that most Python distributions for Windows include libraries compiled for Microsoft Visual Studio. You can get the free Express edition of Visual Studio from:
http://www.microsoft.com/Express/
To build extensions using other tool chains, see the "Using non-Microsoft compilers on Windows" section in the distutils handbook:
http://www.python.org/doc/current/inst/non-ms-compilers.html
For additional information on how to build extensions using the popular MinGW compiler, see:
http://mingw.org (compiler)
http://sebsauvage.net/python/mingw.html (build instructions)
http://sourceforge.net/projects/gnuwin32 (prebuilt libraries)