gpt4 book ai didi

heroku 错误 bash : gunicorn: command not found

转载 作者:行者123 更新时间:2023-12-05 09:15:58 25 4
gpt4 key购买 nike

我几个月前将我的 Flask 应用程序推送到 Heroku https://shakespeare-tweet.herokuapp.com/ (居住)这是本地主机的屏幕截图:https://berkeley.app.box.com/file/303628505050但是我试着更新它,它总是坏掉:

这是 stackoverflow 解决方案:Heroku + gunicorn not working (bash: gunicorn: command not found )

但是当我将它更新到新版本时,它给了我错误Heroku + gunicorn 不工作(bash:gunicorn:找不到命令)

web: gunicorn myapp:app --log-file=-但是应用程序在部署时崩溃:

bash:gunicorn:找不到命令我尝试添加 heroku python buildpack,但没有成功。如果我回滚到之前的提交(其中 requirements.txt 和 Procile 均未更改)。

我仍然收到相同的错误日志:

2018-07-10T21:52:11.855058+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shakespeare-tweet-pr-16.herokuapp.com request_id=068bae51-052e-4bf4-9b25-336c9a036709 fwd="165.124.160.252" dyno= connect= service= status=503 bytes= protocol=https
2018-07-10T21:52:31.144603+00:00 heroku[web.1]: State changed from crashed to starting
2018-07-10T21:52:34.984576+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2018-07-10T21:52:36.771041+00:00 heroku[web.1]: Process exited with status 127
2018-07-10T21:52:36.714985+00:00 app[web.1]: bash: gunicorn: command not found
2018-07-10T21:52:36.787124+00:00 heroku[web.1]: State changed from starting to crashed
2018-07-10T21:52:36.789041+00:00 heroku[web.1]: State changed from crashed to starting
2018-07-10T21:52:40.971471+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2018-07-10T21:52:42.677787+00:00 heroku[web.1]: Process exited with status 127
2018-07-10T21:52:42.692987+00:00 heroku[web.1]: State changed from starting to crashed
2018-07-10T21:52:42.618587+00:00 app[web.1]: bash: gunicorn: command not found
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
Connection to log stream failed. Please try again later.

I would appreciate any help with this issue.

最佳答案

好的,这里的问题是 shakespeare-tweet-pr-16 应用程序是使用 pipenv 构建的,因此它将从 Pipfile 中获取依赖项,而不是 requirements.txt。 Pipfile 仅将 flask 列为依赖项,因此尚未安装 Gunicorn,这就是找不到它的原因。我建议您从您的应用程序中删除 Pipfile。另一种选择是使用完整的依赖项列表更新 Pipfile。

关于heroku 错误 bash : gunicorn: command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51275593/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com