Heroku找不到gunicorn命令

bla*_*nce 7 python heroku flask gunicorn

我正试图在Heroku上放一个小的Flask应用程序.当它启动时,它从日志中给我以下消息:

2015-03-11T01:05:26.737788+00:00 heroku[web.1]: State changed from crashed to starting
2015-03-11T01:05:31.409851+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2015-03-11T01:05:33.863601+00:00 app[web.1]: bash: gunicorn: command not found
2015-03-11T01:05:34.644419+00:00 heroku[web.1]: Process exited with status 127
2015-03-11T01:05:34.668264+00:00 heroku[web.1]: State changed from starting to crashed
Run Code Online (Sandbox Code Playgroud)

我的Procfile是

web: gunicorn application:app
Run Code Online (Sandbox Code Playgroud)

,application.py是我想要运行的文件.我查了一下这个问题,发现它有时是由gunicorn不在requirements.txt中引起的,但我的requirements.txt有它,用这行代码:

gunicorn==19.3.0
Run Code Online (Sandbox Code Playgroud)

.我试过跑步

heroku run pip install gunicorn
Run Code Online (Sandbox Code Playgroud)

它告诉我它成功安装了gunicorn-19.3.0.但是当我尝试在Heroku上运行时

heroku run gunicorn
Run Code Online (Sandbox Code Playgroud)

反对给了我"bash:gunicorn:command not found"的消息.

bre*_*nan 3

添加。gunicornrequirements.txt

为了追求12 因素应用程序,对文件系统所做的更改heroku run短暂的