Heroku + Gunicorn 不工作(bash : gunicorn: command not found )

标签 heroku gunicorn

我成功安装了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

我的程序文件:

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

但是应用程序在部署时崩溃了:

bash: gunicorn: command not found 

我尝试添加heroku python buildpack,但没有成功。如果我回滚到以前的提交(其中 requirements.txtProcile 均未更改),它会起作用:

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)

最佳答案

确保 gunicorn 位于您的 requirements.txt

关于Heroku + Gunicorn 不工作(bash : gunicorn: command not found ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33021874/

相关文章:

ruby-on-rails - 使用外部 postgres 数据库将 rails 部署到 Heroku

java - 错误 : Your buildpacks do not contain the heroku/jvm buildpack! 将 heroku/jvm 添加到您的构建包

python - 错误 : [Errno 98] Address already in use

python-3.x - Gunicorn禁用超时

python - Gunicorn 工作人员在长时间的 API 调用后自行重启

django - Nginx Config for 2 django applications 2 different endpoints 1 server host

ruby-on-rails - 在 Heroku 上使用 Git 部署时出错

heroku - Multi-Tenancy Web 应用程序的自定义域

ssl - Heroku 表示所有免费应用程序都通过 https 提供。如何获取 .pem 文件?

python - 为什么 gUnicorn 在运行 Flask 时生成 2 个进程