Error for pip install indico command

Hi all,

When I followed the steps for installing indico at Apache — Indico 3.1.1 documentation and got stuck at the command

pip install indico

The process seems goes smoothly until
Building wheels for collected packages: psycopg2 …

There are several errors encountered since then and The whole log file after running this command is available at http://ias.ust.hk/indico/error_log.zip

But at the end, it reports the following and suggest to install the binary package

  It appears you are missing some prerequisite to build the package from source.

  You may install a binary package by installing 'psycopg2-binary' from PyPI.
  If you want to install psycopg2 from source, please install the packages
  required for the build and try again.

Would there be anyway to edit the installation steps so that the error could be avoided by installing the binary package directly rather than rebuilding it? Or there should be some other configuration files to be updated so.

Thanks for your kind attention
Eric L.

I think there are 2 solutions:

  1. just run a
    pip install psycopg2-binary==<version from the log>

before pip install indico
2) install the postgres dev files and build-essentials (for deb-based system, for rpm based system probably gcc) (this a actually part of the install doc (step 2))

You need to install the missing prerequisite - yum install -y postgresql13-devel is actually part of the setup guide and should fix the error.

Using the binary package would not work btw, since you’d still be missing a required dependency needed for pip to install the Indico package.

Thanks all for the clues. There is another error found after executing

yum install -y postgresql13-devel`

Error: Package: postgresql13-devel-13.7-1PGDG.rhel7.x86_64 (pgdg13)
           Requires: llvm-toolset-7-clang >= 4.0.1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

if I tried to use --skip broken

Packages skipped because of dependency problems:
    libedit-devel-3.0-12.20121213cvs.el7.x86_64 from base
    llvm5.0-5.0.1-7.el7.x86_64 from epel
    llvm5.0-devel-5.0.1-7.el7.x86_64 from epel
    llvm5.0-libs-5.0.1-7.el7.x86_64 from epel
    postgresql13-devel-13.7-1PGDG.rhel7.x86_64 from pgdg13

==========

After running the pip install indico , it seems that different error message is produced.

Collecting psycopg2==2.9.3
  Using cached psycopg2-2.9.3.tar.gz (380 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      /opt/indico/.venv/lib/python3.9/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      running egg_info
      creating /tmp/pip-pip-egg-info-wlx1namx/psycopg2.egg-info
      writing /tmp/pip-pip-egg-info-wlx1namx/psycopg2.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-wlx1namx/psycopg2.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-wlx1namx/psycopg2.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-wlx1namx/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
      <https://www.psycopg.org/docs/install.html>).

      [end of output]

====

What would be the possible missing piece?

Thanks again for all assistance provided :slightly_smiling_face: