If the following error message appears when starting an application using Google App Engine on Mac OS X: “Could not initialize images API; you are likely missing the Python “PIL” module. ImportError: No module named _imaging”
- Install MacPorts [1]
- Install Python 2.5 with sudo port install python25
- Install Pil for Python 2.5 with sudo port install py25-pil
- using the finder, open ~/.MacOSX/environment.plist and edit the PYTHONPATH variable [2]
- In the Google App Engine launcher Preferences set /opt/local/bin/python2.5 as Python Path
- Restart the Google App Engine launcher
- Run an application
- The error regarding PIL has disappeared
- Let’s code!
[1] http://code.google.com/appengine/docs/python/images/installingPIL.html
[2] Screenshot presenting the settings of the environment.plist file (PYTHONPATH=/opt/local/lib/python2.5/site-packages)