Update: this is unavailable for the current app engine SDK, will occur the cgi import error, the suggestion from experts is "do not use virtual environment with Google App Engine."
- Install Google App Engine at first (details at http://code.google.com/appengine)
sudo port install py25-pil(this will install python2.5 and PIL)
virtualenv --python=$(which python2.5) --no-site-packages appengine
- enable your virtual environment
pip install PIL