Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gunicorn not found on heroku

I want to deploy a very basic Django app on Heroku. I followed the instructions, but the browser shows me the Heroku error page and the heroku logs say

bash: gunicorn: command not found

I have gunicorn in my requirements.txt and configured the wsgi.py and Procfile as instructed by the documentation. What else can I try?

Edit: I also tried to install gunicorn manually on Heroku (heroku run pip install gunicorn), which worked fine, so I am pretty sure that gunicorn is installed. Why doesn't Heroku find it?

Edit 2: It seems that I can install gunicorn manually (heroku run bash and then pip install gunicorn:

~ $ gunicorn
usage: gunicorn [OPTIONS] [APP_MODULE]
gunicorn: error: No application module specified.

but when i log out and log in to the bash again, i get:

~ $ gunicorn
bash: gunicorn: command not found

Heroku seems to install but then discard gunicorn. How can that be?

like image 870
tinaheidinger Avatar asked Oct 31 '22 08:10

tinaheidinger


1 Answers

Hi got the same problem but this might help:

Go to this:

https://github.com/heroku/heroku-buildpack-python

And try to run this command in project's root terminal:

heroku buildpacks:set git://github.com/heroku/heroku-buildpack-python.git

and then update heroku with running below command:

git push heroku master
like image 102
Jay Modi Avatar answered Nov 15 '22 08:11

Jay Modi