Table of Contents
If you have questions about Python on Heroku, consider discussing it in the Python on Heroku forums. Both Heroku and community-based Python experts are available.
When you push a Python application to Heroku, Python 2.7.6 will be used by default:
-----> No runtime.txt provided; assuming python-2.7.6. -----> Preparing Python runtime (python-2.7.6) -----> Installing Setuptools (2.1) -----> Installing Pip (1.5.4) -----> Installing dependencies using Pip ...
Specifying a specific runtime
You can specify an arbitrary version of Python to be used to run your application. This functionality is enabled by the presence of a
$ cat runtime.txt python-3.3.4
When you commit and push to Heroku you’ll see that Python 3.3.4 is detected:
-----> Heroku receiving push -----> Python app detected -----> Preparing Python runtime (python-3.3.4) -----> Installing Setuptools (2.1) -----> Installing Pip (1.5.4) -----> Installing dependencies using Pip ...
Supported runtimes include:
Unsupported runtimes can also be specified (2.4.4–3.3.4). However, we only endorse and support the use of Python 2.7.6 and 3.3.4.
If you specify a different Python runtime than a previous build, your application’s build cache will be purged.