[Zope-DB] Problem with Psycopg?

Stylus zope@stylusinc.net
Fri, 21 Jun 2002 11:57:07 +0530


Hi 

I am trying to get Zope to work with postgres. My installation is 
Mandrake 8.2
PostgresSQL 7.2
Psycopg-1.0.8
Zope 2.5.1

The postgresSQL came installed with my mandrake installation. Zope was
installed by me without a problem (I used the binary from Zope site).
The problem is when I install the psycopg. 

Initially it wouldn't install because I didn't have the mxDateTime
module so I went and got that from egenix site and used the following
command "Zope-2.5.1/bin/python setup.py install" so as to avoid the
Python2.2 that's already installed on my machine. This went thru fine.

Then I discovered that I followed the instructions here
http://initd.org/pub/software/psycopg/FAQ to complete the psycopg
installation. First I had trouble with the location of the mxDateTime so
I copied the entire "mx" dir under usr/local/python2.2/site-packages/mx
to "Zope-2.5.1/lib/python2.1/site-packages/mx". But the .configure would
still fail. So I used the first location in the .configure and it came
back without any errors. Then I had problems running the last command
"make install-zope" so I moved the ZPsycopgDA myself to the correct
location under "Zope-2.5.1/lib/python/Products" Then I copied the
psycopgmodule.so which was created under
"usr/local/python2.2/site-packages/"

After restarting Zope the ZPsycopgDA is broken. The error is 
Import Traceback
Traceback (most recent call last):
  File "/home/zope/Zope-2.5.1/lib/python/OFS/Application.py", line 531,
in import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File
"/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/__init__.py", line
92, in ?
    import DA
  File "/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/DA.py",
line 91, in ?
    from db import DB
  File "/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/db.py",
line 99, in ?
    import psycopg
ImportError:
/home/zope/Zope-2.5.1/lib/python2.1/lib-dynload/psycopgmodule.so:
undefined symbol: PyType_IsSubtype

Can anyone Help me ?!!!

bobby