lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lambdci cannot install psycopg2 >= 2.9.x

gmetzker opened this issue · comments

Attempting to install psycopg2==2.9.1 on python3.6 results in the following error.

bash-4.2# pip install psycopg2==2.9.1
Collecting psycopg2==2.9.1
  Downloading https://files.pythonhosted.org/packages/aa/8a/7c80e7e44fb1b4277e89bd9ca509aefdd4dd1b2c547c6f293afe9f7ffd04/psycopg2-2.9.1.tar.gz (379kB)
    100% |████████████████████████████████| 389kB 3.5MB/s
    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
    <https://www.psycopg.org/docs/install.html>).


    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-xbuwpgu_/psycopg2/
You are using pip version 18.0, however version 21.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

If the version is pinned to psycopg2==2.8.6, it can be installed
Alternatively upgrading pip to the latest version will make this error go away.

Related issues in other projects:

psycopg/psycopg2#1304
aws/aws-sam-build-images#11

Would you consider upgrading the pip version on these containers to something newer (and compatible with psycopg2==2.9.1)?

Thanks