Frequent Asked Questions I have an error while installing psycopg2: Error: pg_config executable not found. pg_config is in postgresql-devel, so install libpq-dev in Debian/Ubuntu or libpq-devel on Centos/Fedora.