title: Django Coverage ModuleNotFoundError: No module named 'django_extensions'
body: <p>I've dug through SO posts, I've dug through random obscure blogs and I can't seem to fix my issue here.</p>
  
  <p>This is how I went about all this:</p>
  
  <p>I created a nice fresh new virtual environment:</p>
  
  <p><code>virtualenv venv</code></p>
  
  <p>I installed all my requirements:</p>
  
  <p><code>pip install -r requirements.txt</code></p>
  
  <p>Per the <a href="https://django-localflavor.readthedocs.io/en/latest/" rel="nofollow noreferrer">LocalFlavor Documentation</a> I pip installed <code>django-localflavor</code></p>
  
  <p>But when I try to run coverage on my application <a href="https://docs.djangoproject.com/en/2.0/topics/testing/advanced/" rel="nofollow noreferrer">per the django docs</a>:</p>
  
  <p><code>coverage run --source='.' manage.py test visitor_check_in</code></p>
  
  <p>I get the error <code>'No module named 'localflavor'</code>...</p>
  
  <p>My installed apps looks like this:</p>
  
  <pre><code>INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'django.contrib.admindocs',
      'localflavor',
      'visitor_check_in',
      'django_extensions',
  ]
  </code></pre>
  
  <p>Just last week I had this running, but I must have goofed something up during a conference recently when I was running through some tutorials or something - but I was in other virtual environments for those tutorials - so I'm stumped.</p>
  
  <p>If I move the order of my installed apps like this:</p>
  
  <pre><code>INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'django.contrib.admindocs',
      'visitor_check_in',
      'django_extensions',
      'localflavor',
  ]
  </code></pre>
  
  <p>It gives me the same no module found error - except it says it cannot find the module <code>django_extensions</code></p>
  
  <p>The traceback looks like this:</p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 15, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
      utility.execute()
    File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/__init__.py", line 337, in execute
      django.setup()
    File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
      apps.populate(settings.INSTALLED_APPS)
    File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
      app_config = AppConfig.create(entry)
    File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/apps/config.py", line 94, in create
      module = import_module(entry)
    File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 978, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 961, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 948, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'django_extensions'
  </code></pre>
  
  <p>As I said - before, I've had no problems with this, but now for the life of me I cannot dig out why this is not working. I have a sinking feeling there's something <em>really</em> simple I'm overlooking, but I can't find it.</p>
  
  <p>I can confirm I'm using <code>Python 3.6</code> and the latest version of <code>pip</code></p>
  
  <p>Edited to add: I can import the library in the Python shell with <code>import localflavor</code></p>