title: Heroku giving bash: gunicorn: command not found
body: <p>I am working on a flask application which is hosted on heroku, but am getting the errors, with the log described below. While doing <code>heroku push</code>, it says deployed, but there are errors.</p>
  <p>I referred to the solutions given <a href="https://stackoverflow.com/questions/62442436/heroku-flask-gunicorn-command-not-found">here</a> didn't work.</p>
  <p>My <code>requirements.txt</code> also has <code>gunicorn==20.0.4</code></p>
  <h3><code>tree</code></h3>
  <pre><code>├── app.py
  ├── notes.md
  ├── Procfile
  ├── PySripts
  │   ├── df_text.py
  │   ├── pandas_implementation.py
  │   └── wordcloud_generator.py
  ├── README.md
  ├── requirements.txt
  ├── runtime.txt
  ├── static
  │   ├── css
  │   │   ├── nouislider.min.css
  │   │   └── style.css
  │   └── js
  │       ├── nouislider.min.js
  │       └── slider.js
  └── templates
      ├── base.html
      ├── index.html
      └── uploader.html
  </code></pre>
  <h3><code>Procfile</code></h3>
  <pre><code>web: gunicorn app:app
  </code></pre>
  <h3><code>runtime.txt</code></h3>
  <pre><code>python-3.8.1
  </code></pre>
  <h3><code>app.py</code></h3>
  <pre><code>import .......
  
  ...
  
  app = Flask(__name__)
  
  ...
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  <h3><code>heroku logs --tail</code></h3>
  <pre class="lang-sh prettyprint-override"><code>2020-09-07T08:40:42.427035+00:00 heroku[web.1]: State changed from down to starting
  2020-09-07T08:40:47.478352+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
  2020-09-07T08:40:49.594399+00:00 app[web.1]: bash: gunicorn: command not found
  2020-09-07T08:40:49.660467+00:00 heroku[web.1]: Process exited with status 127
  2020-09-07T08:40:49.697441+00:00 heroku[web.1]: State changed from starting to crashed
  2020-09-07T08:40:49.699767+00:00 heroku[web.1]: State changed from crashed to starting
  2020-09-07T08:40:56.000000+00:00 app[api]: Build succeeded
  2020-09-07T08:40:56.602961+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
  2020-09-07T08:40:58.787088+00:00 app[web.1]: bash: gunicorn: command not found
  2020-09-07T08:40:58.840299+00:00 heroku[web.1]: Process exited with status 127
  2020-09-07T08:40:58.877891+00:00 heroku[web.1]: State changed from starting to crashed
  2020-09-07T08:41:28.454489+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=url.herokuapp.com request_id=0aa5b8f7-0d40-4eec-9926-17a0710180f7 fwd=&quot;59.153.123.50&quot; dyno= connect= service= status=503 bytes= protocol=https
  2020-09-07T08:41:30.971411+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/favicon.ico&quot; host=&lt;url&gt;.herokuapp.com request_id=f2632ade-6667-4ea1-b6bb-19e37c5c4192 fwd=&quot;59.153.123.50&quot; dyno= connect= service= status=503 bytes= protocol=https
  2020-09-07T08:42:37.641728+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=&lt;url&gt;.herokuapp.com request_id=ee3ddc59-acd4-44d3-ae0f-4fd8776c9138 fwd=&quot;47.31.56.151&quot; dyno= connect= service= status=503 bytes= protocol=https
  2020-09-07T08:42:38.286427+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/favicon.ico&quot; host=&lt;url&gt;.herokuapp.com request_id=dffd9c0e-8ca0-451c-8304-94f57215cbf1 fwd=&quot;47.31.56.151&quot; dyno= connect= service= status=503 bytes= protocol=https
  2020-09-07T09:05:49.534642+00:00 heroku[web.1]: State changed from crashed to starting
  2020-09-07T09:05:55.589238+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
  2020-09-07T09:05:57.673299+00:00 app[web.1]: bash: gunicorn: command not found
  2020-09-07T09:05:57.713334+00:00 heroku[web.1]: Process exited with status 127
  2020-09-07T09:05:57.768159+00:00 heroku[web.1]: State changed from starting to crashed
  2020-09-07T09:57:15.420050+00:00 heroku[web.1]: State changed from crashed to starting
  2020-09-07T09:57:22.078030+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
  2020-09-07T09:57:25.034851+00:00 app[web.1]: bash: gunicorn: command not found
  2020-09-07T09:57:25.095998+00:00 heroku[web.1]: Process exited with status 127
  2020-09-07T09:57:25.158429+00:00 heroku[web.1]: State changed from starting to crashed
  </code></pre>
  <h3><code>heroku local</code></h3>
  <pre><code>5:35:18 PM web.1 |  [2020-09-07 17:35:18 +0530] [28559] [INFO] Starting gunicorn 20.0.4
  5:35:18 PM web.1 |  [2020-09-07 17:35:18 +0530] [28559] [INFO] Listening at: http://0.0.0.0:5000 (28559)
  5:35:18 PM web.1 |  [2020-09-07 17:35:18 +0530] [28559] [INFO] Using worker: sync
  5:35:18 PM web.1 |  [2020-09-07 17:35:18 +0530] [28562] [INFO] Booting worker with pid: 28562
  </code></pre>