Two Pythons and PIL module newbie question..
Hello, I'm sorry to ask such a dumbish newbie question.. I am using the Zope binary release on a Debian Linux system. Debian of course comes with its own Python, so now there are two Pythons on my server box. I recently installed PIL from a .deb, and now I am finding that my Zope installation can't see it. (I assume because my Zope's Python needs to be told where to look for it) What is the proper way (or configuration files I need to edit/link I need to create, etc?) to rectify this situation? Thank you! Also.. another related question.. is there any way the PIL could be available to both Pythons without a conflict, or having to install it again.. Thanks.. Chris
Chris Beaumont wrote:
Hello,
I'm sorry to ask such a dumbish newbie question..
I am using the Zope binary release on a Debian Linux system. Debian of course comes with its own Python, so now there are two Pythons on my server box. I recently installed PIL from a .deb, and now I am finding that my Zope installation can't see it.
There' s still only one python on your debian system ! Zope uses the already installed version To resolve your problem make a symlink from the Zope python's directory to the regular installation dir . But with PIL there is another little issue with Zope. Both zope and pil have an Image.py module . To resolve this issue you have to replace the standard (that is almost empty) __init__.py module in your system PIL directory with the one I append at the end of this mail. You can then use "import Image" in your modules to import the standard zope Image.py module and use "import PIL" to import the PIL package. After the explanations...simply follow these steps: 1) install the PIL deb 2) save the text at the end of this mail in a file as root in a console do 3) run "ln -s /usr/lib/python1.5/site-packages/PIL /usr/lib/zope/lib/python" to link the zope's path to the PIL directory 4) run "mv /usr/lib/python1.5/site-packages/PIL/__init__.py /usr/lib/python1.5/site-packages/PIL/__init__.py.old" to keep a copy of the original file, even if it's almost empty... 5) run "cp <your saved file name> /usr/lib/python1.5/site-packages/PIL/__init__.py to replace the old fake one with one usable. 6) restart zope with "/etc/init.d/zope restart" happy hacking with the PIL and zope! :-) azazel ####begin file # Place this file in your PIL directory. Replace the mostly empty # file of the same name. import Image, ImageFile, ImageEnhance, ImageDraw, _imaging, GifImagePlugin, JpegImagePlugin, PngImagePlugin, BmpImagePlugin ####end file
I have a Zope, PoPy, PostgreSQL installation from Solaris 7 that need to move to Linux. At the moment I'm using RH 6.1 I've had no luck so far with PopY, PygresSQL, or psycopg I really don't care with DA is used, I would just like to get a connection. Before I post the exact errors, does any have a suggestion on what to try on Red Hat 6.1 ? I need to have a python interface as well as Zope DA. Ideally I would like to have a DB-API v2 interface. Thanks, Lee Marzke
On 13 Apr 2001 11:08:49 -0400, Lee Marzke wrote:
I have a Zope, PoPy, PostgreSQL installation from Solaris 7 that need to move to Linux. At the moment I'm using RH 6.1
I've had no luck so far with PopY, PygresSQL, or psycopg I really don't care with DA is used, I would just like to get a connection.
Before I post the exact errors, does any have a suggestion on what to try on Red Hat 6.1 ? I need to have a python interface as well as Zope DA.
I've seen it posted, though cannot verify, that to run popy or psycopg, you need postgresql 7.0x You certainly need to have the postgres-devel rpm installed on the Linux box, and they should ideally match the version on the solaris box (I assume you aren't moving the db).
Ideally I would like to have a DB-API v2 interface.
I _think_ that currently, psycopg is the only one providing this, though don't quote me on that :) Other than that, can't help with the non-info posted. Bill
participants (4)
-
Alberto Berti -
Bill Anderson -
Chris Beaumont -
Lee Marzke