title: ModuleNotFoundError: No module named 'wsgi'
body: <p>I was going to host it using Heroku.
  But it does not work because of the problem with the profile.</p>
  
  <p>This my Procfile </p>
  
  <pre><code>-&gt; web: gunicorn wsgi:app
  </code></pre>
  
  <p>I tried these things.</p>
  
  <pre><code>-&gt;web : gunicorn wsgi.py
  -&gt;web : gunicorn &lt;myproject&gt;.wsgi --log-file-
  </code></pre>
  
  <p>my wsgi.py code</p>
  
  <pre><code>"""
  WSGI config for config project.
  
  It exposes the WSGI callable as a module-level variable named ``application``.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
  """
  
  import os
  
  from django.core.wsgi import get_wsgi_application
  
  os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
  
  application = get_wsgi_application()
  
  
  from whitenoise.django import DjangoWhiteNoise
  application = DjangoWhiteNoise(application)
  </code></pre>
  
  <p>this is my heroku log</p>
  
  <blockquote>
    <p>Starting process with command <code>gunicorn wsgi:app</code>
    2019-09-13T06:06:27.409894+00:00 heroku[web.1]: State changed from
    starting to crashed 2019-09-13T06:06:27.388714+00:00 heroku[web.1]:
    Process exited with status 3 2019-09-13T06:06:27.176179+00:00
    app[web.1]: [2019-09-13 06:06:27 +0000] [4] [INFO] Starting gunicorn
    19.9.0 2019-09-13T06:06:27.177866+00:00 app[web.1]: [2019-09-13 06:06:27 +0000] [4] [INFO] Listening at: <a href="http://0.0.0.0:56276" rel="noreferrer">http://0.0.0.0:56276</a> (4)
    2019-09-13T06:06:27.177959+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [4] [INFO] Using worker: sync 2019-09-13T06:06:27.181907+00:00 app[web.1]: [2019-09-13 06:06:27 +0000] [10] [INFO] Booting worker
    with pid: 10 2019-09-13T06:06:27.187052+00:00 app[web.1]: [2019-09-13
    06:06:27 +0000] [11] [INFO] Booting worker with pid: 11
    2019-09-13T06:06:27.187674+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [10] [ERROR] Exception in worker process 2019-09-13T06:06:27.187678+00:00 app[web.1]: Traceback (most recent
    call last): 2019-09-13T06:06:27.187680+00:00 app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py",
    line 583, in spawn_worker 2019-09-13T06:06:27.187682+00:00 app[web.1]:
    worker.init_process() 2019-09-13T06:06:27.187684+00:00 app[web.1]:
    File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py",
    line 129, in init_process 2019-09-13T06:06:27.187686+00:00 app[web.1]:
    self.load_wsgi() 2019-09-13T06:06:27.187688+00:00 app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py",
    line 138, in load_wsgi 2019-09-13T06:06:27.187690+00:00 app[web.1]:
    self.wsgi = self.app.wsgi() 2019-09-13T06:06:27.187692+00:00
    app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py",
    line 67, in wsgi 2019-09-13T06:06:27.187694+00:00 app[web.1]:
    self.callable = self.load() 2019-09-13T06:06:27.187696+00:00
    app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py",
    line 52, in load 2019-09-13T06:06:27.187698+00:00 app[web.1]: return
    self.load_wsgiapp() 2019-09-13T06:06:27.187700+00:00 app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py",
    line 41, in load_wsgiapp 2019-09-13T06:06:27.187702+00:00 app[web.1]:
    return util.import_app(self.app_uri) 2019-09-13T06:06:27.187704+00:00
    app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py",
    line 350, in import_app 2019-09-13T06:06:27.187706+00:00 app[web.1]:
    <strong>import</strong>(module) 2019-09-13T06:06:27.187708+00:00 app[web.1]: ModuleNotFoundError: No module named 'wsgi'
    2019-09-13T06:06:27.187851+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [10] [INFO] Worker exiting (pid: 10) 2019-09-13T06:06:27.193919+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [11] [ERROR] Exception in worker process 2019-09-13T06:06:27.193924+00:00 app[web.1]: Traceback (most recent
    call last): 2019-09-13T06:06:27.193926+00:00 app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py",
    line 583, in spawn_worker 2019-09-13T06:06:27.193928+00:00 app[web.1]:
    worker.init_process() 2019-09-13T06:06:27.193930+00:00 app[web.1]:
    File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py",
    line 129, in init_process 2019-09-13T06:06:27.193932+00:00 app[web.1]:
    self.load_wsgi() 2019-09-13T06:06:27.193934+00:00 app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py",
    line 138, in load_wsgi 2019-09-13T06:06:27.193936+00:00 app[web.1]:
    self.wsgi = self.app.wsgi() 2019-09-13T06:06:27.193939+00:00
    app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py",
    line 67, in wsgi 2019-09-13T06:06:27.193941+00:00 app[web.1]:
    self.callable = self.load() 2019-09-13T06:06:27.193943+00:00
    app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py",
    line 52, in load 2019-09-13T06:06:27.193945+00:00 app[web.1]: return
    self.load_wsgiapp() 2019-09-13T06:06:27.193947+00:00 app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py",
    line 41, in load_wsgiapp 2019-09-13T06:06:27.193949+00:00 app[web.1]:
    return util.import_app(self.app_uri) 2019-09-13T06:06:27.193951+00:00
    app[web.1]: File
    "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py",
    line 350, in import_app 2019-09-13T06:06:27.193953+00:00 app[web.1]:
    <strong>import</strong>(module) 2019-09-13T06:06:27.193955+00:00 app[web.1]: ModuleNotFoundError: No module named 'wsgi'
    2019-09-13T06:06:27.194099+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [11] [INFO] Worker exiting (pid: 11) 2019-09-13T06:06:27.321586+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [4] [INFO] Shutting down: Master 2019-09-13T06:06:27.321719+00:00 app[web.1]: [2019-09-13 06:06:27
    +0000] [4] [INFO] Reason: Worker failed to boot.</p>
  </blockquote>