flask-base icon indicating copy to clipboard operation
flask-base copied to clipboard

Requirment installation error. Error: pg_config executable not found

Open pikamar opened this issue 9 years ago • 6 comments

  Using cached psycopg2-2.6.1.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 top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    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-U3FPuB/psycopg2/```

Environment:
(flask_base) adop@adop:~/flask-base$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

(flask_base) adop@adop:~/flask-base$ python --version
Python 2.7.12

pikamar avatar Jan 26 '17 06:01 pikamar

Issue was solved by installing sudo apt-get install libpq-dev

pikamar avatar Jan 26 '17 06:01 pikamar

Will add to the readme. thanks 👍

abhisuri97 avatar Jan 26 '17 17:01 abhisuri97

done. ref readme. thank you :)

abhisuri97 avatar Jan 26 '17 17:01 abhisuri97

I am getting this similar error when deploying to aws. I am working in virtual environment. Can anyone help?

1akshat avatar May 20 '17 20:05 1akshat

@1akshat did the solution above help?

sandlerben avatar May 25 '17 23:05 sandlerben

On Mac OS X, I solved it using the homebrew package manager brew install postgresql

In case u are having permission issue in brew do this, sudo chown -R $(whoami) $(brew --prefix)/*

sanjitprd777 avatar Apr 09 '21 11:04 sanjitprd777