-
-
Notifications
You must be signed in to change notification settings - Fork 522
Description
NOTE: This ticket is very similar to "[psycopg2-binary 2.9.2 bundles wrong libpq version on aarch64 #1396" but differs on two details:
a) Linux Build / Hardware / Latest software version
b) Available temporary solution will become deprecated when pip bumps to version 23.1.x (Current pip version is 22.3.1)
** I am running on two Raspberry Py 4B: One for postgres server (docker) and other for client-postgres applications **
Client side raspberry Pi:
- OS: Ubuntu 22.04.1 LTS for Raspberry Pi 4B
- Psycopg version: psycopg2-binary 2.9.5
- Python version: Python 3.10.6
- PostgreSQL version: "PostgreSQL 14.6 (Debian 14.6-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit"
- pip version: 22.3.1
Client side Windows: Client exists but client connection to server do not present any problem.
Server side:
- OS: Ubuntu 22.04.1 LTS for Raspberry Pi 4B
- Psycopg version: psycopg2-binary 2.9.5
- Python version: Python 3.10.6
- PostgreSQL version: "PostgreSQL 14.6 (Debian 14.6-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit"
- pip version: 22.3.1
Describe the bug
Getting psycopg2.OperationalError: SCRAM authentication requires libpq version 10 or above (Client-side error msg) on client-side (raspberri Pi) after server was updated to use SCRAM authentication (which is the current and future default) instead of MD5.
NOTE: Windows client continued to able to connect to server, thus problem is restricted to Rasberry Pi clients.
Temporary solution was found at https://stackoverflow.com/questions/69573312/python-psycopg2-scram-authentication, which basically is:
$ pip uninstall psycopg2-binary
$ sudo apt update -y && sudo apt install -y build-essential libpq-dev
$ pip install psycopg2-binary --no-binary psycopg2-binary
The above fix resolved the problem at client side but deprecation warnings during build phase show that this fix will have to be revised when pip bumps to version 23.1.x. The warnings are:
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at pypa/pip#11453
DEPRECATION: psycopg2-binary is being installed using the legacy 'setup.py install' method, because the '--no-binary' option was enabled for it and this currently disables local wheel building for projects that don't have a 'pyproject.toml' file. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#11451
Please note missing project.toml file to be able to build with wheel
Thanks for your attention.