" import Image " works because PIL uses site-specific bindings to add its installation directory to the import path.
[ me@oldserver ]$ cat /usr/lib/python2.4/site-packages/PIL.pth PIL
The only situation I can think about is where " import Image " works, but " from PIL import Image " does not exist if the installation directory for PIL is outside the import path, but there is a .pth file that points to /some/install/path/PIL .
source share