Heroku Python Support Reference | Heroku Dev Center (original) (raw)

English — 日本語に切り替える

Last updated May 10, 2025

Table of Contents

Heroku supports Python applications, including ones built with popular frameworks like Django, FastAPI, and Flask. This document contains version support info.

To learn more about how Heroku recognizes and builds Python applications, see Python Behavior in Heroku.

To learn how to deploy a sample Python app, check out the Getting Started on Heroku with Python tutorial.

Default Python Version for New Apps

By default, newly created Python apps use the latest patch version of Python 3.13.

For Cedar-generation apps, subsequent builds of the app get pinned to that initial major Python version unless you specify a different version or clear the build cache.

For Fir-generation apps, subsequent builds of the app use the default Python version at the time of the build, and so the version used will change over time.

We strongly recommend that you specify a Python version for your app in a .python-version file instead of relying on the default version.

Specify a Python Version

Specify a Python version by using a .python-version file added to the root of your app, like in this example.

Supported Python Versions

A supported version means that you can expect our tools and platform to work with a given version. It also means you can receive technical support.

We recommend using the newest Python version possible, since newer Python versions contain many performance and feature improvements.

Python Version First Release Upstream End-of-life Heroku Status
3.13 October 2024 October 2029 Supported
3.12 October 2023 October 2028 Supported
3.11 October 2022 October 2027 Supported
3.10 October 2021 October 2026 Supported
3.9 October 2020 October 2025 Deprecated
3.8 October 2019 October 2024 No longer supported
3.7 June 2018 June 2023 No longer supported
3.6 December 2016 December 2021 No longer supported
2.7 July 2010 January 2020 No longer supported

Python Version Support Policy

Our Python version support follows the upstream Python Version Lifecycle.

We deprecate versions as they approach upstream end-of-life (EOL), and remove support from the Python buildpack shortly after EOL occurs. Existing apps will continue to run when we remove support for a Python version, however, you must upgrade to a supported Python version before you can perform any further builds/code deployments.

We recommend upgrading before a Python version reaches its upstream EOL to keep your app secure.

We only support the latest patch release of each supported major Python version.

Behavior

See Python Behavior in Heroku to learn more about how Heroku handles Python applications.

Customer Support

You can submit issues via one of the Heroku Support channels.

Additional Reading