pypgsql installation

Gerhard Häring gh at ghaering.de
Mon Jun 2 06:44:52 EDT 2003


jeewee wrote:
> after installing  postgresql-python.rpm I get this
> when I try to run my code:

postgresql-python.rpm is something else entirely. Which RPM are you 
using and which distribution are you using?

> [jeewee at shakira blog]$ python pg-test.py
> Traceback (most recent call last):
>   File "getupdates.py", line 5, in ?
>     from pyPgSQL import PgSQL
>   File "/usr/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 349, in ?
>     from libpq import *
>   File "/usr/lib/python2.2/site-packages/pyPgSQL/libpq/__init__.py", line
> 23, in ?
>     from libpq import *
> ImportError: /usr/lib/python2.2/site-packages/pyPgSQL/libpq/libpqmodule.so:
> undefined symbol: PyUnicodeUCS2_EncodeDecimal
> 
> could someone lead me to the light?

The Python installation you're using is incompatible with the one the 
RPM was built for.

I'd recommend that you install pyPgSQL from sources instead.

-- Gerhard






More information about the Python-list mailing list