Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku + gunicorn not working (bash: gunicorn: command not found )

I successfully install gunicorn:

remote: -----> Removing .DS_Store files remote: -----> Python app detected remote: -----> Installing dependencies with pip remote:        Collecting gunicorn==19.0.0 (from -r requirements.txt (line 1)) remote:          Downloading gunicorn-19.0.0.tar.gz (382kB) remote:        Installing collected packages: gunicorn remote:          Running setup.py install for gunicorn remote:        Successfully installed gunicorn-19.0.0 

My Procfile:

web: gunicorn myapp:app --log-file=- 

But the app crashes when deployed:

bash: gunicorn: command not found  

I tried adding the heroku python buildpack, but no luck. If I roll back to a previous commit (where requirements.txt and Procile are both unchanged), it works:

heroku/web.1:  Starting process with command `gunicorn myapp:app --log-file=-`  app/web.1:  2015-10-08 17:04:18 [3] [INFO] Listening at: http://0.0.0.0:51854 (3) 
like image 569
maxko87 Avatar asked Oct 08 '15 17:10

maxko87


2 Answers

Make sure gunicorn is in your requirements.txt

like image 77
Quanlong Avatar answered Sep 21 '22 08:09

Quanlong


The issue seemed to fix itself after uninstalling all requirements remotely, and reinstalling them.

like image 29
maxko87 Avatar answered Sep 22 '22 08:09

maxko87