profile
viewpoint

Ask questionsPsycopg2 2.9.1 Python Binary no longer installs

Hi, I'm using psycopg2-binary in Python, and it is not a working build.

Reverting to 2.8.6 still works. Installing in Docker with Python 3.8 presents this error:

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.

Note the If you prefer to avoid building psycopg2 from source, please install the PyPI 'psycopg2-binary' package instead. This states this even when attempting to install the binary package.

I've attempted to compile from source by installing various postgres tools such as postgresql-libs, postgresql-devel libpq, and libpq-devel, but the fact remains, I have to install from source, and cannot use the binary.

I'm using a custom RHEL image:https://hub.docker.com/r/scholarpack/python

I'm not sure if there are some new OS dependencies now, or is this is related to the new build process for Mac and Linux (2.9 release):

Build system for Linux/MacOS binary packages moved to GitHub action.

psycopg/psycopg2

Answer questions CoburnJoe

Also worth noting that upgrading pip worked for me, but the now deleted comment refers to issues with the latest version of pip 21.1.3:

I have this also. Recently updated pip to 21.1.3 on Mac aarch64.

useful!
source:https://uonfu.com/
answerer
Joe Coburn CoburnJoe ScholarPack England scholarpack.com Python developer and author. @butteryvideo
Github User Rank List