title: Django- ModuleNotFoundError: No module named 'django.urls'
body: <p>I am new to python and Django. I am learning using the MDN text guide.
  This is what I followed to setup my computer-<a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/development_environment#Using_a_virtual_environment" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/development_environment#Using_a_virtual_environment</a></p>
  
  <p>This is what my command prompt shows me when I try to test my development webserver</p>
  
  <pre><code>(my_django_environment2) C:\Users\user\Desktop\django_gopal\mytestsite&gt;py -3 manage.py runserver
  Performing system checks...
  
  Unhandled exception in thread started by &lt;function check_errors.&lt;locals&gt;.wrapper at 0x000001FEB45AD8C8&gt;
  Traceback (most recent call last):
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\utils\autoreload.py", line 226, in wrapper
      fn(*args, **kwargs)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\management\commands\runserver.py", line 116, in inner_run
      self.check(display_num_errors=True)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\management\base.py", line 426, in check
      include_deployment_checks=include_deployment_checks,
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\checks\registry.py", line 75, in run_checks
      new_errors = check(app_configs=app_configs)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\checks\urls.py", line 10, in check_url_config
      return check_resolver(resolver)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\checks\urls.py", line 19, in check_resolver
      for pattern in resolver.url_patterns:
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\utils\functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\urlresolvers.py", line 417, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\utils\functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Python36\lib\site-packages\django-1.9-py3.6.egg\django\core\urlresolvers.py", line 410, in urlconf_module
      return import_module(self.urlconf_name)
    File "C:\Python36\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 994, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 971, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 955, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "C:\Users\user\Desktop\django_gopal\mytestsite\mytestsite\urls.py", line 17, in &lt;module&gt;
      from django.urls import path
  ModuleNotFoundError: No module named 'django.urls'
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>"""mytestsite URL Configuration
  
  The `urlpatterns` list routes URLs to views. For more information please see:
      https://docs.djangoproject.com/en/2.1/topics/http/urls/
  Examples:
  Function views
      1. Add an import:  from my_app import views
      2. Add a URL to urlpatterns:  path('', views.home, name='home')
  Class-based views
      1. Add an import:  from other_app.views import Home
      2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
  Including another URLconf
      1. Import the include() function: from django.urls import include, path
      2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
  """
  from django.contrib import admin
  from django.urls import path
  
  urlpatterns = [
      path('admin/', admin.site.urls),
  ]
  </code></pre>
  
  <p>I did get the development server to work initially but after following the 2nd part of the MDN tutorial-(<a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/skeleton_website" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/skeleton_website</a>) and trying to test my skeleton website is when I first started getting this error. </p>
  
  <p>At this point I had django 1.9 but after reviewing this question-(<a href="https://stackoverflow.com/questions/47711703/modulenotfounderror-no-module-named-django-urls">ModuleNotFoundError: No module named &#39;django.urls&#39;</a>), I upgraded to django 2.2.The environment variable and project were both created after upgrading. I still however, continued to get the same error. I then tried to build a new test site by following the first part(MDN text guide) again but this time with a different virtual environment but again got the same error. </p>
  
  <p>Any help is appreciated</p>