Basics

Python Version Guide: Python 2 vs 3, What Is New in 3.10–3.15 and Which to Install

Updated: · Skillaria.Top

The only living branch is Python 3. The latest stable release is Python 3.15 (released 9 October 2026); Python 2 has not been supported since 2020. A new version comes out every October and receives fixes for about five years, so for new projects install the latest 3.x, and check your current version with python3 --version.

Today the only living branch of the language is Python 3. The latest stable version is Python 3.15, released on 9 October 2026, while Python 2 officially reached the end of its life back in 2020. Below we explain how Python versions differ, what appeared in each of 3.10–3.15, which one to install, and how to find out which version you already have.

How Python versions are numbered

A version number has three parts: 3.15.0. The first is the major version (the language branch), the second is the minor version, which adds new features, and the third is the patch number, which contains only bug fixes. When people talk about "Python versions", they usually mean the minor ones: 3.10, 3.11, 3.12 and so on.

Since 2019 there has been a yearly cycle (PEP 602): a new minor version comes out every October. About six months before release, alpha builds appear, followed by betas and release candidates, and after the release come fixes such as 3.15.1, 3.15.2. Updating between patch releases is safe: the language's behaviour does not change within a minor version.

This is also the source of confusion in search: "python 311" and "python 3.11" mean the same thing, version 3.11. The number is not a decimal fraction, so 3.10 is newer than 3.9, and 3.15 is newer than 3.2.

Python 2 and Python 3: what is the difference

Python 3 came out in 2008 and deliberately broke backward compatibility to fix old design decisions in the language. Because of this, code written for Python 2 often will not run on Python 3 without changes. The last release of the second branch is 2.7; its support ended on 1 January 2020, and the final release, 2.7.18, came out in April 2020.

AspectPython 2Python 3
Printingprint "hi" — a statementprint("hi") — a function
Stringsbytes by default, Unicode with u"..."str — always Unicode, bytes are bytes
Division7 / 2 gives 37 / 2 gives 3.5, integer division is 7 // 2
Inputraw_input()input()
Rangesrange builds a list, xrange is lazyrange is lazy
Supportnone since 2020a new version every year

If you find a tutorial where print is written without parentheses, it is about Python 2 and the material is outdated. There is no reason to learn that branch now: it is not installed on new systems, libraries long ago stopped supporting it, and knowledge of it is only useful for porting old code.

What is new in Python 3.10–3.15

Below are the main changes in each version, the ones that affect everyday code. Full lists of changes are in the What's New section of the official documentation.

Python 3.10 (October 2021)

  • Structural pattern matching with match/case (PEP 634) — destructuring data structures instead of chains of if/elif.
  • Union types with the vertical bar: int | None instead of Optional[int] (PEP 604).
  • Several context managers in parentheses in a single with statement.
  • Much clearer syntax error messages.
def describe(point):
    match point:
        case (0, 0):
            return "origin"
        case (x, 0):
            return f"on the X axis: {x}"
        case _:
            return "somewhere else"

print(describe((3, 0)))  # on the X axis: 3

Python 3.11 (October 2022)

  • Speed: the Faster CPython project made the interpreter roughly a quarter faster on average, and more on some tasks.
  • Precise locations in tracebacks: ^^^^ arrows show exactly which expression failed in a line (PEP 657).
  • Exception groups and except* (PEP 654), exception notes via add_note().
  • The tomllib module for reading TOML — for example, pyproject.toml.

Python 3.12 (October 2023)

  • New generics syntax: def first[T](items: list[T]) -> T and the type statement for type aliases (PEP 695).
  • f-strings now follow a full grammar (PEP 701): you can reuse the same quotes inside them, and use line breaks and comments.
  • The outdated distutils was removed from the standard library.
  • Even more detailed error hints, for example "Did you forget to import the module?".
type Pair = tuple[int, int]

def first[T](items: list[T]) -> T:
    return items[0]

songs = ["a", "b"]
print(f"First: {first(songs)!r}, total {len(songs)}")
print(f"{"quotes inside"}")  # works from 3.12

A common question is "since which version do f-strings exist?" The f-strings themselves appeared as early as Python 3.6, while 3.12 added freedom with quotes and line breaks inside the curly braces.

Python 3.13 (October 2024)

  • A new interactive console: colours, multi-line editing, history, and the exit and help commands without parentheses.
  • An experimental free-threaded build without the GIL (PEP 703) and an experimental JIT compiler (PEP 744).
  • "Dead batteries" removed — old modules such as cgi and telnetlib (PEP 594).
  • The bug-fix period for new versions was extended to two years.

Python 3.14 (October 2025)

  • Template strings, t-strings: t"Hello, {name}" returns not a ready string but a template object that can be processed safely (PEP 750).
  • Deferred evaluation of annotations (PEP 649) — fewer problems with types declared further down the file.
  • The no-GIL build stopped being experimental and received official support.
  • The compression.zstd module, syntax highlighting in the console, and except A, B: without parentheses.

Python 3.15 (9 October 2026)

  • Lazy imports with lazy import (PEP 810): a module is loaded on first use, not at start-up. In the course measurement, a script with lazy import pandas started in 14 ms instead of 280 ms.
  • The built-in immutable dictionary frozendict (PEP 814).
  • Unpacking in list comprehensions: [*g for g in groups] (PEP 798).
  • The Tachyon sampling profiler in the standard library (PEP 799).
  • UTF-8 as the default for working with files (PEP 686) — an end to encoding surprises on Windows.
  • New "Did you mean" hints in error messages.
lazy import json                    # PEP 810
cfg = frozendict(limit=500)         # PEP 814
flat = [*g for g in [[1, 2], [3]]]  # PEP 798 -> [1, 2, 3]
print(flat, cfg["limit"])
# python -m profiling.sampling run app.py   # PEP 799, Tachyon

This code runs only on 3.15: on older versions, lazy import and unpacking in a comprehension give a SyntaxError, and frozendict gives a NameError.

Python support periods

Each version lives for about five years. First it receives regular bug fixes and periodic patch releases (for 3.13 onward, two years), then only security fixes until the end of its term. After that the version is end-of-life: nobody fixes vulnerabilities in it anymore.

VersionReleasedEnd of supportStatus in October 2026
2.72010January 2020unsupported
3.9October 2020October 2025unsupported
3.10October 2021October 2026support ending
3.11October 2022October 2027security fixes only
3.12October 2023October 2028security fixes only
3.13October 2024October 2029bug fixes
3.14October 2025October 2030bug fixes
3.15October 2026October 2031the newest

The current status of each branch is published on the Status of Python versions page in the Python Developer's Guide. Check it before choosing a version for a long-lived project.

Which Python version to install

For learning and new projects, install the latest stable release, which is Python 3.15 right now. The argument "I'll take the proven 3.10" does not hold: in October 2026 it stops receiving even security fixes, and learning a language on a version that is going out of support means relearning later. Within Python 3, compatibility is good: code written for an older version almost always runs on a newer one, but not the other way round.

There are exceptions. If a library you need has not yet published wheels for the new version (this happens in the first weeks after the October release, for packages with C extensions), take the previous one, 3.14. On a server with a long lifetime, follow the version from your distribution's repositories, or install the one you need with the uv manager. The main rule is not to choose a version whose end of support is less than a year away.

SituationWhat to install
Learning the language from scratchthe latest stable release (3.15)
A new projectthe latest or the one before it
A library does not support the newest releasethe previous minor version
An old project on 3.10 or belowplan a move to a supported version
Python 2 codeport it to Python 3

How to check your Python version

In the terminal a single command is enough. On macOS and Linux the command is usually python3; on Windows it is python or the py launcher.

$ python3 --version
Python 3.12.3        # an old version — time to upgrade

$ python3 -V
Python 3.15.0

On Windows the launcher shows all installed versions at once, while uv shows the versions it can see and install:

py --list
uv python list

From inside a program, the version is available through the sys module. The sys.version_info tuple is convenient to compare, so that a script can check by itself whether the interpreter suits it:

import sys

print(sys.version)            # full string with the build date
print(sys.version_info[:3])   # for example (3, 15, 0)

if sys.version_info < (3, 10):
    raise SystemExit("Python 3.10 or newer is required")

If python3 --version shows a different version from the one you installed, another interpreter is first on your PATH. To find out which one, run which python3 on macOS and Linux, or where python on Windows.

Several versions on one computer

Keeping 3.13 and 3.15 side by side is perfectly normal: each is installed in its own folder. The easiest way to manage them is with uv: uv python install 3.15 downloads a version, and uv python pin 3.15 pins it to a project through the .python-version file. It is better not to touch or upgrade the system Python on Linux by hand, because the operating system's own tools depend on it.

The minimum version of a project is declared in pyproject.toml, in the requires-python field. Then the package installer will refuse to install the project on an unsuitable interpreter.

[project]
name = "expenses"
version = "0.1.0"
requires-python = ">=3.15"

Summary

The current Python versions belong to the 3 branch, and the newest of them is 3.15, with lazy imports, frozendict and UTF-8 by default. Python 2 ended in 2020, and 3.10 leaves support in October 2026, so it is best to learn and start projects on a recent version. To check yours, run python3 --version. Each topic in the course ends with a "What is new in 3.10–3.15" block, so version changes are covered in practice.

FAQ

What is "IDLE Python 3.10 64-bit" in the Start menu?

It is the simple built-in development environment that the python.org installer sets up; the name shows the interpreter version and its bitness. If it says 3.10, you have a version that is losing support, so it is better to install a recent one.

Can I upgrade Python 3.12 to 3.15 over the top?

Minor versions install side by side, not over each other: after installing 3.15 the old one stays, and you can remove it separately. Libraries must be installed again for the new version, or the virtual environment must be recreated.

What is the difference between 64-bit and 32-bit versions?

The 64-bit version can use more memory and suits all modern computers; the 32-bit version is only for very old systems.

What are alpha and beta versions for?

They are preview builds of the next release, meant for testing libraries and projects. For learning and work, install only the final releases.

Learn this topic on video

This topic is covered in depth with practice in the course “Python 3.15: от новичка до профи”.

Go to course