I did a simple pip install psycopg2
on mac system. It installed fine, but when I try to use psycopg2 I get the error:
Reason: Incompatible library version: _psycopg.so requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8
pip freeze
shows psycopg2==2.4.5
just right. I have installed psycopg2 on several virtualenvs but this is the first time I am seeing such error. I tried uninstalling and reinstalling, same results. Please help
If you are uncomfortable copying libraries into your system directory, you can use the DYLD_LIBRARY_PATH environment variable to force the OS to search Postgres's library directory for libssl. E.g.:
(documented under the
dyld
man page).For me on Mavericks, it worked to just copy the two dylib and relaunch Python: