我正在运行EPD python 2.7.3。我已经通过easy_install安装了psycopg2。但是当我尝试导入psycopg2时,它显示以下错误:
>>>import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID
Referenced from: /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/psycopg2/_psycopg.so
Expected in: dynamic lookup
我是奔跑的mac osx山狮。有什么建议吗?
答案 0 :(得分:0)
它应该可以工作,我在Ubuntu上安装了$ sudo apt-get命令。一切正常。可能会尝试卸载postgresql并重新安装。