Requested runtime (python-) is not available for this stack (heroku-20)

Viewed 2662

I am stuck trying to deploy this Flask App through Heroku. I've researched multiple ways to go about it, but can't seem a way to find it to work. This is what I get when I push to git push heroku master

remote: -----> Building on the Heroku-20 stack
remote: -----> Python app detected
remote:  !     Requested runtime (python-) is not available for this stack (heroku-20).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.

I've cleared & set up build pack and is currently:

=== wonders141 Buildpack URL
heroku/python

The runtime.txt contains:

python-3.9.1

I'm not sure why the error message doesn't define the python version, so I'm at a lost of how to go about this.

3 Answers

This may be a late answer, but you have to use a newline after python-3.9.6 in runtime.txt

Your python version is not supported on heroku stack 20 - and make sure your python version in runtime is in lower case - see below

enter image description here

I figured how to get past this. I had cleared everything in my requirements.txt and left only the packages I needed. Apparently a lot of unnecessary packages were included.

Related