Server!/Horror! I have a magnet and I don't mind using it!

Python, psycopg2, postgresql84 and Mac OS X Snow Leopard

Look no further here's the simple solution to getting psycopg2 to work without placing to much trash on your system.

virtualenv --no-site-packages .
. bin/activate
easy_install  -U setuptools
easy_install pip
PATH=$PATH:/opt/local/lib/postgresql84/bin/ pip install psycopg2 sqlalchemy
#...lots of compile stuff...
You are done. Go into your python shell and import the psycopg2 module...
$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
>>> psycopg2.__version__
'2.2.0 (dt dec release-candidate-1 ext pq3)'
>>>

The solution here is this:

PATH=$PATH:/opt/local/lib/postgresql84/bin/ pip install psycopg2 sqlalchemy

The path shown here is if you installed postgresql84-server from macports. It might differ if you used the native installer for Mac OS X

Generated: 2017-11-02 10:20:47 +0100