首页 > 解决方案 > 与 buildpack 不兼容的应用程序:Django + Python

问题描述

当我点击heroku上的部署按钮时,我得到了一些错误,我已经部署了这个项目一段时间,这次我部署了这个错误:</p>

-----> Building on the Heroku-18 stack
-----> Using buildpack: heroku/python
-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
       More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
 !     Push failed

我已经有 requirnments.txt、runtime.txt、Procfile,我已经在设置中添加了 buildpack(heroku/python),requirnments.txt

asgiref==3.2.10
beautifulsoup4==4.9.3
dj-database-url==0.5.0
dj-static==0.0.6
Django==3.1.1
gunicorn==20.0.4
Pillow==8.1.2
psycopg2-binary==2.8.6
pytz==2020.1
soupsieve==2.2.1
sqlparse==0.3.1
static3==0.7.0

运行时.txt

python-3.7.3

档案

web: gunicorn APP_NAME.wsgi --log-file -

欢迎任何帮助或解释!谢谢你。

标签: djangoheroku

解决方案


您是从主分支还是主分支推送源代码?

当我进入这个问题时,我遇到了和你一样的问题:Deploy from local branch
所以如果你不在主分支,你可以切换到一个,或者使用git push heroku your-current-branch:master.\


推荐阅读