Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Psycopg2 image not found

Trying to setup postgres with the postgres mac app and hit this error, which I haven't been able to solve. Any thoughts?

    ImportError: dlopen(/Users/Craig/pyenv/mysite/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: @executable_path/../lib/libssl.1.0.0.dylib   Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libpq.dylib   Reason: image not found 
like image 524
Craig Cannon Avatar asked May 06 '13 22:05

Craig Cannon


1 Answers

$ sudo ln -s /Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib /usr/lib $ sudo ln -s /Library/PostgreSQL/9.2/lib/libcrypto.1.0.0.dylib /usr/lib 

I encountered this error while working on Django. I have it working on virtualenv with Django==1.3 but not on Django==1.5 where I have to issue the commands above.

In OS X El Capitan you can't do these links without disabling system protection but it works well if you link to /usr/local/lib

like image 164
philippinedev Avatar answered Sep 27 '22 19:09

philippinedev