apt-get install -y python-psycopg2 python-psycopg2-doc python-psycopg2-dbg@H_502_3@@H_502_3@sudo apt-get build-dep python-psycopg2 Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application install: apt-get install postgresql-server*@H_502_3@