title: ImportError : import dj_database_url ImportError: No module named 'dj_database_url'
body: <p>I am attempting to use Django + Heroku + all necessary dependencies to create my app. </p>
  
  <p>After following these steps : </p>
  
  <p><a href="https://devcenter.heroku.com/articles/django-app-configuration#migrating-an-existing-django-project" rel="nofollow noreferrer">migrating an existing django project </a></p>
  
  <p>However I keep getting this error when I ran <code>python3 manage.py runserver</code>: </p>
  
  <blockquote>
    <p>import dj_database_url
    ImportError: No module named 'dj_database_url'</p>
  </blockquote>
  
  <p>I have tried to fix it with <a href="https://stackoverflow.com/questions/12683367/heroku-django-no-module-named-dj-database-url">these instructions </a> and <a href="https://stackoverflow.com/questions/18444819/django-dont-see-dj-database-url">this </a></p>
  
  <p>THIS is my code : </p>
  
  <p>I imported the dj-database-url </p>
  
  <pre><code>import dj_database_url
  
  db_from_env = dj_database_url.config(conn_max_age=500)
  DATABASES['default'].update(db_from_env)
  </code></pre>
  
  <p>I added the follow STATIC assets necessitities </p>
  
  <pre><code>PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
  
  STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
  STATIC_URL = '/static/'
  
  # Extra places for collectstatic to find static files.
  STATICFILES_DIRS = (
      os.path.join(PROJECT_ROOT, 'static'),
  )
  
  STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
  </code></pre>
  
  <p>THIS is in my requirements.txt file </p>
  
  <blockquote>
    <p>dj-database-url==0.4.2</p>
    
    <p>gunicorn==19.7.1</p>
    
    <p>whitenoise==3.3.0</p>
  </blockquote>
  
  <p>I am still getting the <code>ImportError</code>. How do I fix this? </p>