title: ModuleNotFoundError: No module named 'debug_toolbar' Django 3.1
body: <p>I'm facing a &quot;common&quot; problem apparently as I searched and found several topics about it. None of the answer provided worked for me as I already did everything mentionned.</p>
  <ol>
  <li><p>I setup the virtualenv</p>
  </li>
  <li><p>Then, I installed django-degub-toolbar</p>
  <p><code>pip install django-debug-toolbar</code></p>
  </li>
  <li><p>Add the application in the settings</p>
  <pre class="lang-py prettyprint-override"><code>INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      # External apps
      'debug_toolbar',
      # Internal apps
      ...,
  ]
  </code></pre>
  </li>
  <li><p>And edited the middleware</p>
  <pre class="lang-py prettyprint-override"><code>MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      # Django Toolbar interaction with the middleware
      'debug_toolbar.middleware.DebugToolbarMiddleware',
  ]
  </code></pre>
  </li>
  </ol>
  <p>But nothing worked and I still got the error when I run the server.</p>
  <p>Traceback</p>
  <pre><code>Exception in thread django-main-thread:
  Traceback (most recent call last):
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/venv/lib/python3.7/site-packages/django/core/servers/basehttp.py&quot;, line 45, in get_internal_wsgi_application
      return import_string(app_path)
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/venv/lib/python3.7/site-packages/django/utils/module_loading.py&quot;, line 17, in import_string
      module = import_module(module_path)
    File &quot;/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/mangas_collection/mangas_collection/wsgi.py&quot;, line 16, in &lt;module&gt;
      application = get_wsgi_application()
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/venv/lib/python3.7/site-packages/django/core/wsgi.py&quot;, line 13, in get_wsgi_application
      return WSGIHandler()
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/venv/lib/python3.7/site-packages/django/core/handlers/wsgi.py&quot;, line 127, in __init__
      self.load_middleware()
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/venv/lib/python3.7/site-packages/django/core/handlers/base.py&quot;, line 40, in load_middleware
      middleware = import_string(middleware_path)
    File &quot;/Users/saiko-san/Documents/app-mangas-collection/venv/lib/python3.7/site-packages/django/utils/module_loading.py&quot;, line 17, in import_string
      module = import_module(module_path)
    File &quot;/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 953, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 965, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'debug_toolbar'
  </code></pre>