By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

pyPgSQL giving error!

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> 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?

Jul 18 '05 #2

P: n/a
> 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
Jul 18 '05 #3

P: n/a
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
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.