close

[Solved] django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg Error Occurs?

Today I get the following error django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg in python.

How To Solve django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg Error ?

  1. How To Solve django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg Error ?

    To Solve django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg Error type pip install psycopg2-binary inside the virtualenv worked for me

  2. django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg

    To Solve django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg Error type pip install psycopg2-binary inside the virtualenv worked for me

Solution 1

type pip install psycopg2-binary inside the virtualenv worked for me

Solution 2

I had the error as well; although psycopg2 was installed on my system using apt-get, my virtualenv couldn’t find it:

>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named psycopg2

It was fixed by doing a pip install psycopg2-binary inside the virtualenv (or pip install psycopg2 for <2.8 psycopg2 versions).

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read