When I try to run the command:
import psycopg2
I get the error:
ImportError: dlopen(/Users/gwulfs/anaconda/lib/python2.7/si
So first for me openssl
re-install never worked. It was quite irritating that all of the above answers failed for me. To be sure that it's a openssl issue, first, install psycopg2-binary
using pip
pip install psycopg2-binary
After installing psycopg2-binary
, if you're getting error like ld: library not found for -lssl
then do the following
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
if these didn't work then you can try to upgrade psycopg2
and re-check that issue still there or not.
pip install psycopg2 --upgrade
if all the above didn't worked then only try reinstalling openssl
as mentioned in all above answers.