Can't connect Postgres to Python

John D. Tiedeman jdtiede at sstar.com
Tue Mar 16 21:56:32 CET 2004


{Sent on 2004-03-15 with wrong subject line}

On 2004-03-11 Dave Brueck wrote:

> Here's the configure command I used, don't know if it will help you at 
> all:
>
> ./configure --with-postgres-libraries=/usr/local/pgsql/lib
> --with-postgres-includes=/usr/local/pgsql/include
> --with-zope=/home/dave/Zope261
> --with-mxdatetime-includes=/usr/lib/python2.3/site-packages/mx/DateTime/mxDateT 
>
> ime
>
> -Dave
>  
>
I adapted to:
   ./configure --with-postgres/libraries=/usr/local/pgsql/lib 
--with-postgres-includes=/usr/local/pgsql/include
--with-zope=/usr/lib/Zope-2.6.2-src 
--with-mxdatetime-includes=/usr/lib/python2.2/site-packages/mx/DateTime/mxDateTime 


I have python2.3 but mx is only in 2.2 for some reason. Zope-2.6.2 says 
use Python 2.1 only; it didn't install satisfactorily but as I'm not 
planning to use on a website at this point does that matter? The 
libraries are there.

At this point, using the command
   conn = psycopg.connect("dbname=personal", serialize=0)
from psycogq documentation, I get
   NameError: name 'psycopg' is not defined

What am I missing?




More information about the Python-list mailing list