繁体   English   中英

Heroku - 上传 Django-App 时应用程序与 buildpack https://github.com/heroku/heroku-buildpack-python.git 不兼容

[英]Heroku - App not compatible with buildpack https://github.com/heroku/heroku-buildpack-python.git when uploading a Django-App

我是 Heroku 的新手,当我尝试将我的项目推送到 Github 时,我只收到错误消息:

应用与 buildpack 不兼容: https://github.com/heroku/heroku-buildpack-python.git

完整的 output:

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 文件

运行时.txt:

python-3.8.1

有人知道如何解决这个问题吗?

Heroku 未将您的应用检测为 python。 您的 requirements.txt 文件可能有问题。 您应该更正文件并检查是否有任何类型的输入错误。 您可以使用以下方法创建一个:

pip freeze > requirements.txt

您也可以尝试使用 heroku python buildpack 支持的 python 运行时之一。

python-3.9.4
python-3.8.9
python-3.7.10
python-3.6.13
python-2.7.18

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM