Installing from source code
Download and unpack the archive, then run from the unpacked directory:
python setup.py install
Your system must be able to compile a C Python extension against the libpq library: you will probably need python-dev and libpq-dev packages.
The pg_config must be available in your path, or alternatively you must specify its full path in the setup.cfg file.
Installing from PyPI
You will still need the packages mentioned in Installing from source code in order to install Psycopg.
Installing on Mac OS X
As a first option, please consider using a packaged version of Psycopg from Fink or MacPorts.
If you still want to build Psycopg from source, take a look at these articles.