This is my scenario, I set up virtualenv on my MacBook (love that virtualenv btw). I installed Jupyter in one of my Virtual Environments (pip install jupyter). While running Jupyter, I attempted to import psycopg2 (I had previously installed this module in another virtualenv by the way). Then I received an error like the one below:
“dlopen(Library not loaded: libssl.dylib)”
Fixing this is simple. Copy the following files in to your /usr/local/lib folder
I found these files in my Postgres installation (/Library/PostgreSQL/9.5/lib), navigated there and then ran the following command
sudo cp libssl.1.0.0.dylib libcrypto.1.0.0.dylib /usr/local/lib/
After that, I am able to import psycopg2 on Jupyter running in my virtualenv with no problem!