ImportError: DLL load failed : - when trying to im

2019-02-04 15:19发布

>>> 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.

3条回答
Bombasti
2楼-- · 2019-02-04 15:31

You can also try installing win-psycopg from here

查看更多
乱世女痞
3楼-- · 2019-02-04 15:37

On Windows, make sure your path includes the Postgres bin directory. In my machine it's c:\Programs\PostgreSQL\9.3\bin.

查看更多
爷的心禁止访问
4楼-- · 2019-02-04 15:45

According to this thread you need to install an earlier version since there were problems with the latest build.

Simply install an earlier version, (2.0.10 works great), even with PostgreSQL 8.4.x series.

查看更多
登录 后发表回答