veni vidi Scripsi

PIL, JPEG and Freetype support on Mac OS X Lion when using Virtualenv

Assuming you're using virtualenv and pip and working in your virutalenv ((your-env)username@computer:~$).

  1. Download PIL, but do not install it:

    $ pip install --no-install PIL
  2. For Freetype support: edit in {your-virtualenv-folder}/build/PIL. On line 40 change FREETYPE­_­ROOT = None to FREETYPE­_­ROOT = libinclude('/usr/X11'):

    # Library pointers.
    # Use None to look for the libraries in well-known library locations.
    Theme: Basic Nature
    # Use a string to specify a single directory, for both the library and
    # the include files.  Use a tuple to specify separate directories:
    # (libpath, includepath).  Examples:
    # JPEG_ROOT = "/home/libraries/jpeg-6b"
    # TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
    # If you have "lib" and "include" directories under a common parent,