Tags

, , , ,

Could not initialize images API; you are likely missing the Python “PIL” module.

ImportError: No module named PIL
import PIL
  • OS: ubuntu 12.04 desktop 64 bit | windows
  • gae 1.8.8
  • python 2.7.3

Install PIL

installation instructions for gae

sudo apt-get install python-imaging

Include PIL in app.yaml like so:

libraries:
- name: PIL
version: "1.1.7"

check google app engine 3rd party libraries

Check PYTHONPATH

unix-like

import sys
from pprint import pprint as pp
pp(sys.path)

command in your terminal to see what folders are in your PYTHONPATH.

python -c "import sys, pprint; pprint.pprint(sys.path)"

windows

echo %PATH%

add / set / append module or python to sys env or PYTHONPATH environment variables windows

set PYTHONPATH=%PYTHONPATH%;C:\Python27

OR

set path=C:\Python27

unix-like

export PYTHONPATH=$PYTHONPATH:/host/Python27/Lib/site-packages

Buffer

Get Free Email Updates

Delivered by FeedBurner



Follow algby: