Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pyPgSQL giving error!

Reply
Thread Tools

pyPgSQL giving error!

 
 
Gurpreet Sachdeva
Guest
Posts: n/a
 
      01-13-2005
I am using Redhat 9.0/python2.3. I installed pyPgSQL-2.4.tar.gz and it
was successfull. Now when I am trying to import that module, I got:

Python 2.3.3 (#1, Jan 11 2005, 15:24:09)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyPgSQL import PgSQL

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "pyPgSQL/PgSQL.py", line 391, in ?
from libpq import *
File "pyPgSQL/libpq/__init__.py", line 23, in ?
from libpq import *
ImportError: No module named libpq

I tried googling also but couldn't get the answere.
Please help...

~Garry
 
Reply With Quote
 
 
 
 
Harald Massa
Guest
Posts: n/a
 
      01-13-2005
> I am using Redhat 9.0/python2.3. I installed pyPgSQL-2.4.tar.gz and it
> was successfull. Now when I am trying to import that module, I got:
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from pyPgSQL import PgSQL

> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "pyPgSQL/PgSQL.py", line 391, in ?
> from libpq import *
> File "pyPgSQL/libpq/__init__.py", line 23, in ?
> from libpq import *
> ImportError: No module named libpq


did you really do ./configure, make and make install?

where is libpq.*

was a postgres installation present while doing ./configure et all?

 
Reply With Quote
 
 
 
 
Gurpreet Sachdeva
Guest
Posts: n/a
 
      01-14-2005
> did you really do ./configure, make and make install?
No, I did python setup.py build and python setup.py install

> where is libpq.*

linpq is there in /usr/lib/python2.3/site-packages/pyPgSQL/

> was a postgres installation present while doing ./configure et all?


No, But I installed postgresql-libs before installing pyPgSQL

Regards,
Garry
 
Reply With Quote
 
Gurpreet Sachdeva
Guest
Posts: n/a
 
      01-14-2005
And now when I did...

cd /usr/local/lib/python2.3/site-packages/pyPgSQL/libpq/

[root@linux libpq]# python __init__.py
Traceback (most recent call last):
File "__init__.py", line 23, in ?
from libpq import *
ImportError: ./libpqmodule.so: undefined symbol: PyUnicodeUCS2_EncodeDecimal

What is this error??? I saw this error sometimes back... Please help...

Thanks,
Garry
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The giving that keeps on giving sixteenmillion C Programming 0 11-19-2007 10:59 PM
PyPGSQL - OID Manuel Huesser Python 1 05-27-2004 12:55 PM
Unicode -> Python -> DBAPI -> PyPgSQL -> PostgreSQL Rene Pijlman Python 2 11-03-2003 11:44 AM
Problems with pyPgSQL Timo Virkkala Python 0 09-13-2003 03:41 PM
OverflowError in pyPgSQL when accessing tables with many rows Paolo Alexis Falcone Python 3 06-29-2003 12:32 AM



Advertisments