Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Language Support
  • Python
  • Heroku Python Support Reference

Heroku Python Support Reference

English — 日本語に切り替える

Last updated January 13, 2025

Table of Contents

  • Default Python Version for New Apps
  • Specify a Python Version
  • Supported Python Versions
  • Python Version Support Policy
  • Behavior
  • Customer Support
  • Additional Reading

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

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

  • Getting Started on Heroku with Python
  • Python Behavior in Heroku
  • Configuring Django Apps for Heroku
  • Deploying Python and Django Apps on Heroku
  • Managing Buildpacks

Keep reading

  • Python

Feedback

Log in to submit feedback.

Optimizing Python Application Concurrency Optimizing Python Application Concurrency

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices