Psycopg2 and PostgreSQL 9.1 on Snow Leopard
Today I've had to install psycopg on my MacBook Pro running Mac OS X 10.6.8 (10K549) and I had some troubles doing that, so I'll post this here just for the records. To install PostgreSQL, i used the .dmg provided by postgresql web itself, as I'm not a big fan of fink or macports. And I downloaded psycopg from the project web . I'm not a big fan of Fink or MacPorts, so I didn't use any of them to get any software, actually. My first attempt was to install psycopg as usual, typing '$python setup.py install', but I get this error: Please add the directory containing pg_config to the PATH or specify the full executable path with the option: python setup.py build_ext --pg-config /path/to/pg_config build ... or with the pg_config option in 'setup.cfg'. That one was easy. I just added the location of pg_config at the end of the command. It looked like this: '$PATH=$PATH:/Library/PostgreSQL/9.1/bin python setup.py install'. Note that this is the