[Zope] installing PIL and Photo
Brian Burton
brian.burton@nlynx.com
Thu, 30 Mar 2000 16:46:00 -0600
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01BF9A67.6DB5C040
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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 (innermost last):
File "/usr/local/zope/lib/python/OFS/Application.py", line 387, in =
import_products
product=3D__import__(pname, global_dict, global_dict, silly)
File "/usr/local/zope/lib/python/Products/Photo/__init__.py", line 42, =
in ?
import Photo
File "/usr/local/zope/lib/python/Products/Photo/Photo.py", line 87, in =
?
from PIL.Image import BICUBIC, BILINEAR, NEAREST
ImportError: No module named PIL.Image
I followed the instructions in PIL. I created a directory called =
site_packages in /usr/lib/python1.5, copied the PIL directory to there =
(/usr/lib/python1.5/site_packages/PIL),
put a PIL.pth file in /usr/lib/python1.5/site_packages which has one =
line ("PIL")
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']
>>>
=20
Why does the /usr/lib/python1.5/site_packages/PIL not show up in the =
path?
Regards,
Brian
------=_NextPart_000_0005_01BF9A67.6DB5C040
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I installed Zope 2.1.6, the product =
called Photo, a=20
full version of Python 1.5.2, and PIL on a RedHat 5.2 system. When =
I bring=20
up Zope, the product Photo says it is broken (in the Product Management =
page in=20
the Control Panel). The traceback shows the =
following:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Traceback (innermost last):<BR> =
File=20
"/usr/local/zope/lib/python/OFS/Application.py", line 387, in=20
import_products<BR> product=3D__import__(pname, =
global_dict,=20
global_dict, silly)<BR> File=20
"/usr/local/zope/lib/python/Products/Photo/__init__.py", line 42, in=20
?<BR> import Photo<BR> File=20
"/usr/local/zope/lib/python/Products/Photo/Photo.py", line 87, in=20
?<BR> from=20
PIL.Image &nbs=
p;=20
import BICUBIC, BILINEAR, NEAREST<BR>ImportError: No module named=20
PIL.Image<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I followed the instructions in =
PIL. I created=20
a directory called site_packages in /usr/lib/python1.5, copied the PIL =
directory=20
to there (/usr/lib/python1.5/site_packages/PIL),</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>put a PIL.pth file in=20
/usr/lib/python1.5/site_packages which has one line ("PIL")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2>I removed the zope/bin/python =
file, and=20
changed the start file to use /usr/bin/python</FONT></FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2>Now if I execute python and do=20
this....</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Python 1.5.2 (#5, Mar 29 2000, =
17:56:25) [GCC=20
2.7.2.3] on linux2<BR>Copyright 1991-1995 Stichting Mathematisch =
Centrum,=20
Amsterdam<BR>>>> import sys<BR>>>> print =
sys.path<BR>['',=20
'/usr/lib/python1.5/', '/usr/lib/python1.5/plat-linux2',=20
'/usr/lib/python1.5/lib-tk',=20
'/usr/lib/python1.5/lib-dynload']<BR>>>><BR> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why does the =
/usr/lib/python1.5/site_packages/PIL=20
not show up in the path?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Brian</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial> </DIV></FONT></BODY></HTML>
------=_NextPart_000_0005_01BF9A67.6DB5C040--