You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
sudo apt-get install python-psycopg2 libpq-dev
Are there any code examples left?
New code examples in category Shell/Bash