473,698 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pyPgSQL giving error!

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
3 2763
> 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
> 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
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__.p y", line 23, in ?
from libpq import *
ImportError: ./libpqmodule.so: undefined symbol: PyUnicodeUCS2_E ncodeDecimal

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

Thanks,
Garry
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2772
by: Paolo Alexis Falcone | last post by:
Whenever I try to access a table with many rows using PgSQL's fetchall(), this happens: >>> from pyPgSQL import PgSQL >>> db = PgSQL.connect("192.168.0.8:5432:whitegold","dondon","dondon") >>> PgSQL.NoPostgresCursor = 1 >>> cur = db.cursor() >>> cur.execute("SELECT * FROM customer") >>> data = cur.fetchall() Traceback (most recent call last):
0
1446
by: Timo Virkkala | last post by:
Hello. I'm having some trouble with getting the pyPgSQL module to work. I installed it and the mxDateTime module into my local directory (I'm doing this on my university's server and I don't have access to /usr). When I try to import it I get the following error: >>> from pyPgSql import libpq Traceback (most recent call last): File "<stdin>", line 1, in ?
2
3598
by: Rene Pijlman | last post by:
I can't seem to find any way to specify the character encoding with the DB API implementation of PyPgSQL. There is no mention of encoding and Unicode in the DB API v2.0 spec and the PyPgSQL README. When I have Unicode strings in Python and store it in a PostgreSQL Unicode database, will the data automatically be correctly encoded? Or do I need to specify the UTF-8 client encoding on the database connection somehow? I'm using the...
2
1385
by: Frank Millman | last post by:
Hi all Below is the text of a message I was about to send in connection with an obscure problem. I have now almost got to the bottom of it, and am fairly confident that it is a bug in pyPgSQL. I hope this is the correct place to report such bugs. If not, please advise the correct forum. I have left the original message intact as it provides important information. At the bottom, I have recorded the new information that I
2
1695
by: J Dubal | last post by:
Hello good people, Following works in FC1 (python-2.2.3-7, postgresql-7.3.4-11, kernel-2.4.22-1.2194.nptl, pyPgSQL-2.4) from pyPgSQL import PgSQL conn = PgSQL.connect('localhost',database='rop') loccur = conn.cursor() loccur.execute("DECLARE itemcursor CURSOR FOR \ SELECT * FROM locmf")
1
1739
by: laurenq uantrell | last post by:
I'm trying to figure out why I can't loop through a function (myFunctionXYZ) after an error. The problem is that I can loop from the error once back into the code section of myFunctionXYZ, but on the second error the error is reported by the function that called myFunctionXYZ, Function DooDah. Example: Function DooDah() on Error goto ErrorRoutine
5
2127
by: washoetech | last post by:
Hello, I have tried to run my ASP.NET 2.0 application from IIS and I get a page not found error. When I debug from within Visual Studio.NET 2005 my application works fine. Any ideas? Thanks, washoetech
9
1721
by: Tin Gherdanarra | last post by:
Hallo, I'm trying to install pypgsql. However, I get syntax errors while compiling the C sources. The following excerpt from pgconnection.h looks a little funny to me: typedef struct { PyObject_HEAD /* Here is the syntax error, and rightly so */ PGconn *conn; PyObject *host;
0
1166
by: Eric | last post by:
Hey guys, Has anyone seen this error when installing trac? The problem seems related to pyPgSQL, which is installed. (Although I had to go in and add some headers to make it work) Templates directory > Creating and Initializing Project Failed to create environment.
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.