Specifying a Python Runtime | Heroku Dev Center
Specify a particular version of Python via your app’s runtime.txt.