Heroku-应用程序与buildpack不兼容https://github.com/heroku/heroku-buildpack-python.git 上传Django应用程序时
我是Heroku的新手,当我尝试将我的项目推送到Github时,我只收到错误消息: 应用程序与buildpack不兼容: 完整输出:Heroku-应用程序与buildpack不兼容https://github.com/heroku/heroku-buildpack-python.git 上传Django应用程序时,python,django,git,heroku,Python,Django,Git,Heroku,我是Heroku的新手,当我尝试将我的项目推送到Github时,我只收到错误消息: 应用程序与buildpack不兼容: 完整输出: remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Using buildpack: https://github.com/hero
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: https://github.com/heroku/heroku-buildpack-python.git
remote: -----> App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-python.git
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected
remote:
To https://git.heroku.com/appname.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/appname.git'
我的根目录中有一个Procfile:
web: gunicorn Food_Blog.wsgi --log-file -
我还有一个requirements.txt和runtime.txt文件
runtime.txt:
python-3.8.1
有人知道如何解决这个问题吗?Heroku没有检测到你的应用程序是python。您的requirements.txt文件可能有问题。你应该更正文件,检查是否有打字错误。 您可以使用以下方法创建一个:
pip freeze > requirements.txt
您还可以尝试使用heroku python构建包支持的这些python运行时之一
python-3.9.4
python-3.8.9
python-3.7.10
python-3.6.13
python-2.7.18