您好我正在尝试在Mac 10.6上安装psycopg2。我安装后,当我尝试导入
时出现此错误import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 69, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/Library/Python/2.6/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID
Referenced from: /Library/Python/2.6/site-packages/psycopg2/_psycopg.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/psycopg2/_psycopg.so
我从http://initd.org/psycopg/download/获得了源代码,并尝试使用setup / easy_install从源代码构建,并在安装程序中将pg_config的值设置为 /Library/PostgreSQL/8.4/bin/pg_config 。 CFG
我尝试了所有这些替代方案,似乎没有任何工作
http://blog.timc3.com/2010/08/20/psycopg2-os-x-_pqbackendpid/
http://initd.org/psycopg/articles/2010/11/11/links-about-building-psycopg-mac-os-x/
这里有什么想法吗?