Currently I am installing psycopg2 for work within eclipse with python.
I am finding a lot of problems:
sudo pip3.4 install psycopg2
is not working and it is showing the following message Error: pg_config executable not found.
FIXED WITH:export PATH=/Library/PostgreSQL/9.4/bin/:"$PATH”
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/psycopg2/_psycopg.so Library libssl.1.0.0.dylib Library libcrypto.1.0.0.dylib
FIXED WITH: sudo ln -s /Library/PostgreSQL/9.4/lib/libssl.1.0.0.dylib /usr/lib sudo ln -s /Library/PostgreSQL/9.4/lib/libcrypto.1.0.0.dylib /usr/lib
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _lo_lseek64 Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/psycopg2/_psycopg.so Expected in: /usr/lib/libpq.5.dylib in /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/psycopg2/_psycopg.so
Can you help me?
You need to replace the /usr/lib/libpq.5.dylib library because its version is too old.
Here's my solution to this problem:
$ sudo mv /usr/lib/libpq.5.dylib /usr/lib/libpq.5.dylib.old $ sudo ln -s /Library/PostgreSQL/9.4/lib/libpq.5.dylib /usr/lib
If you are using PostgresApp, you need to run the following two commands:
sudo mv /usr/lib/libpq.5.dylib /usr/lib/libpq.5.dylib.old sudo ln -s /Applications/Postgres.app/Contents/Versions/9.4/lib/libpq.5.dylib /usr/lib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With