Unable to import path from django.urls Unable to import path from django.urls django django

Unable to import path from django.urls


The reason you cannot import path is because it is new in Django 2.0 as is mentioned here: https://docs.djangoproject.com/en/2.0/ref/urls/#path.

On that page in the bottom right hand corner you can change the documentation version to the version that you have installed. If you do this you will see that there is no entry for path on the 1.11 docs.


You need Django version 2

pip install --upgrade djangopip3 install --upgrade djangopython -m django --version # 2.0.2python3 -m django --version # 2.0.2


Use url instead of path.

from django.conf.urls import urlurlpatterns = [    url('', views.homepageview, name='home')]