31π
β
I had the same error after brew decided to upgrade my postgresql
package to version 14 (your version may vary).
There was this part of the error message:
Library not loaded: '/usr/local/opt/postgresql/lib/libpq.5.dylib'
...
Reason: tried: '/usr/local/opt/postgresql/lib/libpq.5.dylib' (no such file)
I basically found the new location of the libpq
and symlinked it to the location where psycopg2
was looking for it:
ln -s /usr/local/lib/postgresql@14/libpq.5.14.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib
Hope that helps anyone else with a similar issue.
π€alecxe
1π
I ran into the same error this morning. My solution is a bit different than the accepted one :
I uninstalled and reinstalled psycopg2.
pip uninstall psycopg2
pip install -r requirements.txt
No version change here but I guess the build process identified the right path.
π€SΓ©raphin
- How to make Django Password Reset Email Beautiful HTML?
- How to remove Add button in Django admin, for specific Model?
- Django β Import views from separate apps
- Uwsgi http is ambiguous
- How to I hide my secret_key using virtualenv and Django?
Source:stackexchange.com