OS X Leopard comes with Python 2.5.1 and lacks the PIL package for image manipulation. Google App Engine's local SDK uses PIL to emulate its image manipulation features.
The HOWTO Install PIL on OS X Leopard article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
The instructions on Google's installation page for PIL are incorrect.
To install PIL, follow these instructions by Matt Kangas instead. (Thanks, Matt!) :)
The only thing I'd add to that is that the instructions won't work unless you've got your .bash_profile file set up to read your .bashrc file.
So, make sure you have the following code in the .bash_profile file in your home folder (cd ~):
if [ -f ~/.bashrc ]; then . ~/.bashrc fi
The HOWTO Install PIL on OS X Leopard article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
[2011 Apr 12]
Eclipse pydev users:
In order to run the project by using ecplipse, you must add the package to the interpreter system libs:
1. Preferences > PyDev > Interpreter – Python
2. In the section below, where are listed the System libs, click on “New Folder” and select the right package.
In my case, I have OSX Leopard and the PIL is in the folder:
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL