0

I tride to install psycopg2

  1. pip install psycopg2 Result -bash: pip: command not found

  2. pip install django psycopg2 Result -bash: pip: command not found

  3. pip3 install django psycopg2 Result

Collecting django Using cached https://files.pythonhosted.org/packages/39/b0/2138c31bf13e17afc32277239da53e9dfcce27bac8cb68cf1c0123f1fdf5/Django-2.2.3-py3-none-any.whl Collecting psycopg2 Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.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'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  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'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).


----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w3/c440kx852_ngw54hg111zdmh0000gn/T/pip-install-fck7_ffz/psycopg2/ You are using pip version 19.0.3, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

  • Possible duplicate of [How to install psycopg2 with pg\_config error?](https://stackoverflow.com/questions/35104097/how-to-install-psycopg2-with-pg-config-error) – wilkben Jul 10 '19 at 20:13
  • Same problem sudo apt-get install python-psycopg2 Result : sudo: apt-get: command not found – Saeed A Jul 10 '19 at 20:25

0 Answers0