Skip to content Skip to sidebar Skip to footer

Modulenotfounderror: No Module Named 'django.urls'

Whenever I try to run 'python manage.py runserver' in Powershell as admin, I get an ModuleNotFoundError: No module named 'django.urls'. Can somebody help me please?! I'm using djan

Solution 1:

Since, you are already using python 3.6 so you need to upgrade django to latest version which is greater than 2. For those who are using python 2.7, python2.7 don't support django 2 so you can't install django.urls.

On PowerShell

pip install -U django

Verification

PS C:\Users\xyz> python
Python 3.6.6 |Anaconda, Inc.| (default, Jul 252018, 15:27:00) [MSC v.191064 bit (AMD64)] on win32
Type"help", "copyright", "credits"or"license"for more information.
>>> from django.urls import path
>>>

As next prompt came, it means it is installed now and ready to use.

Solution 2:

I think this should work!

from django.urlsimport path

It was introduced in django 2.0, you need to upgrade your django version for it to work. Kindly check the documentation for django 2.0 https://docs.djangoproject.com/en/2.0/ref/urls/

Solution 3:

from django.urlsimport path

is new feature of Django 2.0 , so upgrade your Django please...

Post a Comment for "Modulenotfounderror: No Module Named 'django.urls'"