Psycopg2 needs libpq-dev. The wsgi role is a convenient way to install.