Psycopg2: Install fails with β€œError: pg_config executable not found.”

Created on 9 Nov 2016  Β·  3Comments  Β·  Source: psycopg/psycopg2

$ pip3 install --user --no-binary :all: psycopg2
Collecting psycopg2
  Downloading psycopg2-2.6.2.tar.gz (376kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 378kB 329kB/s
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    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-iyufx0gi/psycopg2/
$ pip3 install --user psycopg2
Collecting psycopg2
  Using cached psycopg2-2.6.2.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    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-nhwpglgb/psycopg2/

pip version: pip 8.1.2 from /usr/lib/python3/dist-packages (python 3.5)

invalid

All 3 comments

so install it. Read the F manual.

Make sure to have PostgreSQL development headers and tools installed, and to have the pg_config command in path. They are required to build psycopg.

Sorry, I thought pg_config was a part of psycopg.

Thanks @fogzot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benkuhn picture benkuhn  Β·  4Comments

yamagoya picture yamagoya  Β·  5Comments

AlexanderNeilson picture AlexanderNeilson  Β·  3Comments

Farit picture Farit  Β·  6Comments

mattip picture mattip  Β·  6Comments