简体   繁体   中英

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

I'm new with Heroku and when I try to push my project to Github, I just get the error message:

App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-python.git

Complete 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'

I have a Procfile in my root:

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

Also I have a requirements.txt and runtime.txt file

runtime.txt:

python-3.8.1

Anyone an idea how to fix this issue?

Heroku is not detecting your app as python. There might be problem with your requirements.txt file. You should correct the file and check if there is any kind of typing mistake. You can create one by using this:

pip freeze > requirements.txt

You can also try by using one of these python runtime supported by heroku python buildpacks.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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