nehal gulhane
nehal gulhane

Reputation: 31

ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable?

i added the python path in environment variable then also it is giving me same error so please anyone can help me

(py1) C:\Users\NIKITA GULHANE\projects\raksh>python manage.py runserver Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line File "C:\Users\NIKITA~1\Envs\py1\lib\site-packages\django__init__.py", line 1, in from django.utils.version import get_version File "C:\Users\NIKITA~1\Envs\py1\lib\site-packages\django\utils\version.py", line 1, in import datetime ModuleNotFoundError: No module named 'datetime'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "manage.py", line 14, in ) from exc ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

Upvotes: 0

Views: 2626

Answers (1)

Valentina Gatica
Valentina Gatica

Reputation: 61

I found you have to ensure Django is imported in the file wsgi.py.

Hope this answer is useful

Upvotes: 0

Related Questions