Search code examples
pythondjangoherokuruntime-error

Requested runtime (Python-3.7.3) is not available for this stack (heroku-18)


I'm using Django 2.2.3 and I'm getting this error:

Requested runtime (Python-3.7.3) is not available for this stack (heroku-18)

But, Heroku's Python documentation says that python-3.7.3 should be available in stack heroku-18.

runtime.txt contains Python-3.7.3.

FULL ERROR

Counting objects: 100% (43/43), done.
Delta compression using up to 4 threads
Compressing objects: 100% (36/36), done.
Writing objects: 100% (43/43), 10.70 KiB | 996.00 KiB/s, done.
Total 43 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote:  !     Requested runtime (Python-3.7.3) is not available for this stack (heroku-18).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed

Solution

  • Like just about everything else in the Heroku ecosystem, runtime.txt is case-sensitive. Change its contents to

    python-3.7.3
    

    with a lowercase p.