syntax errors while building pypgsql

Gerhard Häring gh at
Wed Nov 23 14:59:40 CET 2005

Tin Gherdanarra wrote:
> 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 */
> [...]
> I don't know what PyObject_HEAD or PGconn is,
> but if they are types, a syntax error is justified here: [...]

I don't think that's the real error. Are there any error messages 
*before* that? Like the compiler can't find "Python.h" or something? 
That would be an indication that you do not have the python-devel 
package installed.

Btw. the Debian package of pyPgSQL is called python-pgsql, so an apt-get 
install python-pgsql should do.

-- Gerhard

More information about the Python-list mailing list