Hardik Parmar
Hardik Parmar

Reputation: 97

Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found

raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found.

i have installed letest postgres setup

psycopg2 installed

enter image description here

Upvotes: 1

Views: 12845

Answers (6)

Bassey John
Bassey John

Reputation: 1

I was using pipenv

What you can do is first uninstall pyscopg2:

pipenv uninstall psycopg2

Then also uninstall psycopg2-binary:

pipenv uninstall psycopg2-binary

Finally Install the psycopg2-binary again:

pipenv uninstall psycopg2-binary

Upvotes: 0

Utkarsh Dalal
Utkarsh Dalal

Reputation: 253

The fix for my coworker was:

pip uninstall psycopg2

pip uninstall psycopg2-binary

pip install psycopg2-binary

Upvotes: 0

Bruno Vermeulen
Bruno Vermeulen

Reputation: 3455

Try to install psycopg2 with:

 pip install psycopg2-binary

see psycopg2

Upvotes: 2

ww398
ww398

Reputation: 1

The way to solve it is to downgrade your python version.

Upvotes: -1

pranavpie
pranavpie

Reputation: 121

pip install psycopg2

This worked for me

Upvotes: 0

Hardik Parmar
Hardik Parmar

Reputation: 97

I just solve this error by installing second latest python version and to install PostgreSQL use pip install postgres this will install psycopg2 & psycopg2-binary

Upvotes: 5

Related Questions