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

谁说胖子不能爱 提交于 2019-11-28 05:42:35

Make sure gunicorn is in your requirements.txt

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

Harshit Yadav

If you have both requirements.txt and Pipfile in the project root, then I would recommend to delete the Pipfile and have all your requirements listed in requirements.txt file (including gunicorn).

It will then show: "Installing requirements from pip", and all of your requirements listed in requirements.txt will be installed.

I was missing the heroku/python buildpack so I went to the dashboard and:

Settings -> Add buildpack -> heroku/python

After checking that gunicorn is in requirements.txt run:

pip install -r requirements.txt

My output contained several Requirement already satisfied: ... but gunicorn wasn't installed:

Collecting gunicorn (from -r requirements.txt (line 2))
Using cached ...

Installing collected packages: gunicorn
Successfully installed gunicorn-19.9.0
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!