您的位置:首页 > 运维架构

windows安装psycopg2问题解决方案

2011-06-28 16:30 477 查看
在windows下使用

easy_installpsycopg2安装psycopg2时安装成功,但在python中import psycopg2时却提示如下错误:

from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: DLL load failed: 找不到指定的模块。

为何??

ImportError: DLL load failed: The specified module could not be found.

the file _psycopg.pyd is a dll. For its relatively small size it is
probably dynamically linked to the libpq.dll. I think the system
either fails to find libpq.dll or some of the other dependencies (they
are listed in the setup.py).
[code]I suggest you to use a tool to check its dll dependencies (maybe
http://www.dependencywalker.com/ could be ok) and see if there is
anything missing. If libpq.dll is the missing one, try putting it in a
PATH directory or in the psycopg2 package directory.


具体解决方案如下:
查找libpq.dll,将其copy到psycopg2的包中,或者放置在系统PATH下即可
[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐