-
-
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
ImportError: undefined symbol: PQencryptPasswordConn #1018
Comments
I'm pretty sure you have mismatch in the libpq header files and/or the libraries installed. The Take a look at the build logs: you will likely see that PG_VERSION_NUM is greater than 10xxxx, which compiles in the import ctypes
libpq = ctypes.cdll.LoadLibrary("libpq.so")
print(libpq.PQlibVersion()) which I bet is less that 10xxxx. |
Thanks for the reply, I had a look and the result of that print statement is "90613". That all seems fine though as I want to use version 9.6 (as this is the latest supported version on the raspbian stretch OS). Where can I find the psycopg2 build logs? There isn't anything in my "/usr/src/prt37/lib/python3.7/site-packages/psycopg2" that says what version of postgres tried to build with. postgres 9.6 is the only version on my pi, and pg_config and libpq are both looking for it. |
Resolved by installing from source, 3.7 must've used the wheel.
|
@alexjpm i am still getting the same error after I did by method you mentioned. was there anything else as well I had to do after |
Hi, |
I had this same issue and solved it by:
Things work well now. |
Thank you, this helps me |
The trick with uninstalling |
Hi everyone,
I'm running PostgreSQL 9.6.13 on a raspberry pi 3B+. I'd been running psycopg2 version 2.8.3 with python 2.7.13 fine, but (finally!) have gotten round to upgrading to python 3.7.3. I created a new venv, pip installed psycopg2, and ran into this error:
ImportError: /usr/src/prt37/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: PQencryptPasswordConn
I've check pg_config and the libpq dependencies as suggested on the FAQ, and they're both using:
/usr/lib/arm-linux-gnueabihf/libpq.so.5
Has anyone got any ideas how to solve this and what is causing it? My python 2.7 venv is still running fine.
Thanks,
Alex
The text was updated successfully, but these errors were encountered: