Ciasto piekarz
Ciasto piekarz

Reputation: 8277

heroku installing python 3.6.2 instead of python 2.7

I have written a python 2.7 based flask app, however when I push it to heroku using git push heroku master i see in termonal that it installs python version 3.6.2 instead of python version 2.7.

how should I fix this and why is it picking python 3.6 ?

Upvotes: 1

Views: 1292

Answers (1)

Mohideen bin Mohammed
Mohideen bin Mohammed

Reputation: 20137

Newly created Python applications in heroku will be default to the Python 3.6.2 .. so if you want to specify a version of Python to be used to run your application.

This functionality is enabled by the presence of a runtime.txt file.

mohi@dev:~$ vi runtime.txt
mohi@dev:~$ cat runtime.txt
python-2.7.13

If you specify a different Python runtime than a previous build, your application’s build cache will be purged.

Upvotes: 3

Related Questions