Can't connect Postgres to Python

Dave Brueck dave at pythonapocrypha.com
Tue Mar 9 18:24:44 EST 2004


John wrote:
> I have tried PostGreSQL, PyGreSQL, pypgsql, psycopg, and PDO and have
> yet to connect to PostgreSQL 7.4 (.1 in one box, .2 in the other).
>
> With PostGreSQL-3.4 and pypgsql-2.4, using setup.py build results in
> "error: command 'gcc' failed with exit status 1."
>
> I couldn't install psycopg-1.1.11 because it asks for PgSql header
> files; the only one I can identify is postgres.h.

I've been using pyscopg-1.1.11 with PostgreSQL 7.4 and Python 2.3 on Mandrake
9.2 and have found it to work really well for my needs. To get it to build I
had to do

cp -r postgres-7.4/src/include/catalog /usr/local/pgsql/include/

to get the headers in the right place. Also had to install mxDateTime first.

HTH,
-Dave





More information about the Python-list mailing list