postgresql 导入错误:DLL 加载失败:-尝试导入 psycopg2 库时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1306367/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ImportError: DLL load failed : - when trying to import psycopg2 library
提问by john2x
>>> import psycopg2 Traceback (most recent call last): File "", line 1, in File "C:\Python26\lib\site-packages\psycopg2\__init__.py", line 60, in from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: DLL load failed: The application has failed to start because its si de-by-side configuration is incorrect. Please see the application event log for more detail.
I get this error when trying to import psycopg2.. I've searched for days, and found no solutions. I've tried installing the Visual C++ 2008 Package, but I still get the same error.
尝试导入psycopg2时出现此错误。我已经搜索了几天,但没有找到解决方案。我已尝试安装 Visual C++ 2008 包,但仍然遇到相同的错误。
采纳答案by pkit
回答by Carlos A. Ibarra
On Windows, make sure your path includes the Postgres bin directory. In my machine it's c:\Programs\PostgreSQL\9.3\bin.
在 Windows 上,确保您的路径包含 Postgres bin 目录。在我的机器中,它是 c:\Programs\PostgreSQL\9.3\bin。