-
-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
psycopg2-binary 2.9.5 bundles wrong libpq version on Ubuntu 64 for Raspberry Pi 4B #1526
Comments
Hello, which manylinux tag does Raspberry Pi architecture use? If you |
I made a typo (numpi instead of numpy) but both where installed. |
Additional information: |
This seems exactly the same problem of #1396, no? |
Daniele, I agree. I am satisfied with the support for this ticket here. It should be closed, specially that we have a temporary fix that should work until pip moves to version 23.1.x |
No, psycopg2-binary doesn't go through Ubuntu. It is compiled and uploaded on PyPI by us. The currently available version bundles a libpq version too old to support scram. The solution is to redo the build script in order to compile the most recent libpq from source and ship that one. This is something we know how to do: psycopg 3 binary packages for aarch64 architecture ships with such libpq. psycopg 2 packages predate that work. It is just a matter of time for me to clean my backlog enough to reach #1396 and find half a day to do that job. I am closing this as duplicate of the other task. Thank you very much for the detailed report and the collaboration! |
Thanks for your support and for all the great work on psycopg for Postgres. |
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:
Client side Windows: Client exists but client connection to server do not present any problem.
Server side:
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.
The text was updated successfully, but these errors were encountered: