Heroku push: Failure with "Git push Heroku master" and "Buildpack" --> Python Heroku push: Failure with "Git push Heroku master" and "Buildpack" --> Python heroku heroku

Heroku push: Failure with "Git push Heroku master" and "Buildpack" --> Python


I defined the required python version as "Python 3.6.x" - but it must be "Python-3.6.x" (the dash is key!)

That is what "Specifying a Python Runtime" does indeed document, in Specifying a Python version:

By default, newly created Python apps use the python-3.9.6 runtime.
You can also specify a different supported Python version.

Supported runtimes

  • python-3.9.6 on all supported stacks
  • python-3.8.11 on all supported stacks
  • python-3.7.11 on all supported stacks
  • python-3.6.14 on all supported stacks

And, as seen here, make sure the runtime.txt is correctly encoded.