Django error for psycopg2 ImportError: DLL load failed
I had the same problem on Windows
, The way i get it working was to install psycopg2
from:
http://www.stickpeople.com/projects/python/win-psycopg/
And doing it this way it's recomended here http://initd.org/psycopg/install/
In the case, where the install binaries are not up to date (as it happened today: latest Python is 3.4 and PostgresSQL - 9.3, while latest avaiable are 3.3 and 9.2.6 respectively), it is enough to add the PostgresSQL binary path (e.g. C:\Program Files\PostgreSQL\9.3\bin
) to the path variable.
Note: you need to restart your command line to get it working.
2019 Update
I encountered the same issue with Python 3.8 and psycopg2
2.8.3 and 2.8.4. Apparently psycopg2
doesn't work with Python 3.8 yet (understandably, since 3.8 released very recently). The fix for me was to go back to using Python 3.7.