我想在Heroku上部署一个非常基本的Django应用程序.我按照说明操作,但浏览器显示Heroku错误页面和heroku日志说明
bash: gunicorn: command not found
我在requirements.txt中有gunicorn,并按照文档的说明配置了wsgi.py和Procfile.我还能尝试什么?
编辑:我也尝试在Heroku(heroku运行pip安装gunicorn)上手动安装gunicorn,这很好,所以我很确定安装了gunicorn. Heroku为什么不找到它?
编辑2:似乎我可以手动安装gunicorn(heroku运行bash然后pip安装gunicorn:
~ $gunicorn
usage: gunicorn [OPTIONS] [APP_MODULE]
gunicorn: error: No application module specified.
但是当我退出并再次登录bash时,我得到:
~ $gunicorn
bash: gunicorn: command not found
Heroku似乎安装但随后丢弃了gunicorn.怎么可能?
最佳答案 你有同样的问题,但这可能会有所帮助:
转到这个:
https://github.com/heroku/heroku-buildpack-python
并尝试在项目的根终端中运行此命令:
heroku buildpacks:set git://github.com/heroku/heroku-buildpack-python.git
然后通过运行以下命令更新heroku:
git push heroku master