Pylons 导入 Psycopg2 错误
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 60, in <module>
from _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
Psycopg2 以前工作正常,但现在出现此错误。
关于这个问题的任何想法都非常感谢。
编辑:所以在每次设置我的 mac 时处理这么多 psycopg2 错误之后,我决定使用运行 Ubuntu 的 VMWareFusion 来代替。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 60, in <module>
from _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
Psycopg2 was working fine before, but now I get this error.
Any ideas on this issue much appreciated.
EDIT: so after dealing with so many psycopg2 errors everytime I set up my mac, I've decided to use VMWareFusion running Ubuntu instead.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
难道是 postgres 安装被删除/更新了吗?该符号应该来自 libpq。
Could it be that the postgres installation was removed/updated? The symbol is supposed to come from libpq.
这对我来说也很糟糕,就我而言,这似乎不是 32 位与 64 位的问题:
This is broken for me too, and in my case it doesn't appear to be a 32 vs 64 bit issue:
您收到此错误是因为您的 64 位版本的 python 找不到 64 位 psycopg2。
您可以将 python 降级为在 32 位模式下运行,或者尝试获取 64 位 psycopg2。关于此主题有更多讨论 本·克里格的博客。
You get this error because your 64-bit version of python can't find a 64-bit psycopg2.
You can either downgrade your python to run in 32-bit mode or try to get a 64-bit psycopg2. There is more discussion on this topic over on Ben Kreeger's blog.
通过强制 Apache 可执行文件执行 32 位解决了类似问题
resolved similar issue by forcing Apache executables 32 bit execution