Error when executing pip install -e when installing indico

Hi,

Today I tried to execute this step from Indico installation:
pip install -e
using the tutorial documented in Installation Guide (development) in Indico site:

And then I got the following error:

Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: 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.

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>).

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

ERROR: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-GA4D10/psycopg2/

Does anyone know how can I correct that?
Thanks a lot!

Sounds like you are missing the postgres dev packages from your linux distro, which are needed to install psycopg2.

Hi,

The posgres dev package is actually installed but not in the path. On my CentOS 7 environement, it is in /usr/pgsql-9.6/bin. Have to add that to the path environment after activate the indico.

I guess you’re using a non-standard package (probably because CentOS provides only Postgres 9.2)? Otherwise that shouldn’t be needed.

AFAIK the pgdg package on centos doesn’t add its dev tools to PATH. IIRC I added something about this to the prod setup guide very recently.

1 Like

Thanks for the help, guys!