[Solved-4 Solutions] pg_config executable not found
Error Description:
- Trouble installing psycopg2. We get the following error when we try to pip install psycopg2:
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:
- 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
Solution 1:
- pg_config is in postgresql-devel (libpq-dev in Debian/Ubuntu, libpq-devel on Cygwin/Babun.)
Solution 2:
- On Mac OS X, we can solve it with
Solution 3:
- Have you installed python-dev? If you already have, try also installing libpq-dev