Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: DLL load failed : - when trying to import psycopg2 library

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

like image 740
john2x Avatar asked Aug 20 '09 13:08

john2x


1 Answers

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

like image 154
Carlos A. Ibarra Avatar answered Sep 29 '22 17:09

Carlos A. Ibarra