close

[Solved] Import Error: No module named django

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Import Error: No module named django 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 Import Error: No module named django Error Occurs?

Today I get the following error Import Error: No module named django in python.

How To Solve Import Error: No module named django Error ?

  1. How To Solve Import Error: No module named django Error ?

    To Solve Import Error: No module named django Error I had the same error, and this fix my issue
    python -m pip install django
    🙂 Done!

  2. Import Error: No module named django

    To Solve Import Error: No module named django Error I had the same error, and this fix my issue
    python -m pip install django
    🙂 Done!

Solution 1

To check your path, you can use the following code:

import sys     
print(sys.path)

If you already know where django is installed, it should be easy to test if the desired directory is in your path with directory in sys.path.

Regarding where your PYTHONPATH is defined, note that it’s an environment variable, so you can check its value (if defined) with: echo $PYTHONPATH

Solution 2

I had the same error, and this fix my issue

python -m pip install django

🙂 Done!

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