应用与 buildpack 不兼容:Django + Python

时间:2021-06-20 14:51:21

标签: django heroku

当我在heroku上点击deployed按钮时,出现了一些错误,我已经部署了这个项目一段时间了,这次我部署了这个错误:

-----> 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), 要求.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 -

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

1 个答案:

答案 0 :(得分:0)

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

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