[Zope] installing PIL and Photo

Nick Garcia ngarcia@codeit.com
Thu, 30 Mar 2000 17:11:07 -0800


> Brian Burton wrote:
> 
> I installed Zope 2.1.6, the product called Photo, a full version of
> Python 1.5.2, and PIL on a RedHat 5.2 system.  When I bring up Zope,
> the product Photo says it is broken (in the Product Management page in
> the Control Panel).  The traceback shows the following:

[Traceback snipped]

> I removed the zope/bin/python file, and changed the start file to use
> /usr/bin/python
> 
> Now if I execute python and do this....
> 
> Python 1.5.2 (#5, Mar 29 2000, 17:56:25)  [GCC 2.7.2.3] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import sys
> >>> print sys.path
> ['', '/usr/lib/python1.5/', '/usr/lib/python1.5/plat-linux2',
> '/usr/lib/python1.5/lib-tk', '/usr/lib/python1.5/lib-dynload']
> >>>
> 
> Why does the /usr/lib/python1.5/site_packages/PIL not show up in the
> path?

Heh, I just ran into this same problem a few days ago.  For some reason
PIL doesn't install a __init__.py (or at least the RPM of it didn't). 
Check /usr/lib/python1.5/site-packages/PIL for a __init__.py.  If it
isn't there, then make one with this content:

import Image, ImageFile, ImageEnhance, ImageDraw, _imaging,
GifImagePlugin, JpegImagePlugin, PngImagePlugin, BmpImagePlugin

-- 
Nick Garcia | ngarcia@codeit.com
CodeIt Computing | http://codeit.com