Posted by Daniele Varrazzo
on December 4, 2010
just released Psycopg 2.3.1. No new feature since release 2.3.0: the only fix is for a build issue on CentOS 5.5 x86_64 (ticket #23).
Comments (9 posted).
Hi, my system is CentOS release 5.5 (Final), but still got "error: command 'gcc' failed with exit status 1" error, I didn`t change any settings, just use "python setup.py install", could you give me any advice? Thanks!
The real error should be in some of the output line above: you are probably missing some of the development packages:
With these three packages psycopg2 compiles (and passes all the tests) on a freshly installed CentOS 5.5.
The server really didn`t install devel package, it works now!Thanks very much!
On Centos 5.5 I have trouble installing with PostgreSQL 9.0 (installed using yum from PostgreSQL yum repository). I have installed postgresql90-devel libs tool.
While trying to install psycopg2 2.3.1 using easy_install, gcc complains about missing libpq-fe.h.
I have this file in /usr/pgsql-9.0/include/. Should psycopg2 installer know about this location?
Yes, when you have PostgreSQL installed in a non-standard location, or you have several versions installed, you should specify which libs and includes to use.
This is done very easily by specifying the path of the pg_config binary, from which the setup reads all the relevant values. In your case it should be in /usr/pgsql-9.0/bin/pg_config.
You can specify the pg_config full path either editing the setup.cfg file or with a command line option of the build_ext command: using something like:
python setup.py build_ext --pg-config /path/to/pg_config build
to build the libarary and then a regular:
python setup.py install
eventually with sudo to install it.
Thanks for the answer!
Do you know if it is possible to pass this option to setup.py when using easy_install?
This is a distutils-specific question: after some quick googling it seems there is no solution (see for example this thread). I don't know about other distutils-like packages (distribute, PIP...)
By default psycopg setup looks for pg_config in the path anyway, so an easier solution may be prepending its directory to the PATH when running easy_install; you may try something like:
PATH=/path/to/postgres/bins:$PATH easy_install psycopg2
Is this psycopg 2.3.x 100% backward-compatible with the 2.0.x series?
It should be, we do our best to maintain backward compatibility.
In 2.2 we have changed the interface for the async features (i.e. cursor.execute(async=1) is gone), but the async area was mostly an experiment before. The stable features shouldn't have been changed in a non-compatible way.
Feel free to add a new comment.
You can use reST syntax.
If you enter anything in this field your comment will be treated as spam
© 2010—2014 — Daniele Varrazzo (at gmail.com)