I try to install psycopg2
in a virtualenv using pip
, the compilation looks ok, it says "Successfully installed psycopg2", but when I try to import it in python interpreter (in virtualenv), it indicates error:
File "<stdin>", line 1, in <module>
File "/Users/me/sites/env/trackmap/lib/python2.7/site-packages/psycopg2/__init__.py", line 67, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/Users/me/sites/env/trackmap/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: libssl.dylib
Referenced from: /Users/me/sites/env/trackmap/lib/python2.7/site-packages/psycopg2/_psycopg.so
Reason: Incompatible library version: _psycopg.so requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8
The thing is I install it successfully using pip
in my other virtual env before, like, several weeks ago, and get it working with the postgresql
on my mac. I am wondering if this is a problem of compiler? I saw some warnings like shortens from 64-bit to 32-bit
during the installation of psycopg2. My compiler is i686-apple-darwin11-llvm-gcc-4.2
, default one on mac os x lion.
I see several posts related to psycopg2
install but most of them are solved by installing in a virtual env. So...could anyone give me a suggestion? Thank you! Really appreciated.
p.s. If you need the compilation log of installing psycopg2 please let me know, I didn't paste it here because it is too long.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…