. Advertisement .
..3..
. Advertisement .
..4..
I get the error message:
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2
Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'
Has anyone ever faced this problem? How to troubleshoot the “error: pg_config executable not found..” The problem appears when I try to operate the following program:
$ which pg_config
/usr/pgsql-9.1/bin/pg_config
The cause: I think this error occurs because you haven’t installed libpq-dev/postgresql-libs.
The solution: To connect with a PostgreSQL database backend, you must install libpq-dev/postgresql-libs, which contains header files and a static library for generating C applications to link with the libpq library.
On Arch this will run:
On Debian and Ubuntu:
On Mac OS X:
On Red Hat/CentOS/Fedora:
pg_config
is inpostgresql-devel
(libpq-dev
in Debian/Ubuntu,libpq-devel
on Centos/Fedora/Cygwin/Babun.)