Installation & Versions

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

This page explains how to get a working PyTorch environment, how the release train and the support matrix work, and how to check what you actually installed. It targets Python 3.13 and PyTorch 2.15 (released 2026-10-28). The verification snippet was run on Python 3.13 with PyTorch 2.15 (the macOS arm64 CPU wheel from PyPI) on 2026-10-31; the GPU install commands need the matching hardware and were not executed.

Release train and support matrix

PyTorch publishes a minor release roughly every two months. The upstream file RELEASE.md holds the tentative calendar and the support matrix. Patch releases are optional and are published only for the latest minor release.

Table 1. Recent releases (from RELEASE.md, checked 2026-10-30)
PyTorch Python Stable CUDA Stable ROCm Released

2.15

3.11 to 3.15 (3.15t experimental)

13.2 (13.4 experimental)

7.14 (10.0 wheels also published)

2026-10-28

2.14

3.10 to 3.15 (3.15t experimental)

12.6, 13.0, 13.2

7.14

2026-09-02

2.13

3.10 to 3.15 (3.15t experimental)

12.6, 13.0

7.2

2026-07-08

2.12

3.10 to 3.14 (3.14t experimental)

12.6, 13.0

7.2

2026-05-13

Three consequences matter in practice:

  • Python 3.10 wheels stop with 2.14. PyTorch 2.15 needs Python 3.11 or newer, so an old virtual environment on 3.10 silently stays on 2.14. The upstream notice is linked in the references.

  • The set of CUDA toolkits changes between releases. Each wheel bundles its own CUDA runtime libraries, so you do not install a CUDA toolkit to run PyTorch. You need only a recent enough NVIDIA driver.

  • The page lists "t" suffixed entries (for example 3.15t) for free-threaded Python builds; they are experimental.

Installing with pip

The recommended route is pip inside a virtual environment. The selector on https://pytorch.org/get-started/locally/ generates the exact command for your operating system and compute platform. Wheels are served from per-platform indexes below https://download.pytorch.org/whl/. PyTorch 2.15 wheels are published on the cpu, cu132, cu134, rocm7.14, rocm10.0 and xpu indexes.

python3.13 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip

# CUDA 13.2 build (stable CUDA for 2.15)
pip install torch --index-url https://download.pytorch.org/whl/cu132

# CPU-only build (smaller, no GPU libraries)
# pip install torch --index-url https://download.pytorch.org/whl/cpu

# AMD ROCm builds (Linux): ROCm 7.14 or ROCm 10.0
# pip install torch --index-url https://download.pytorch.org/whl/rocm7.14
# pip install torch --index-url https://download.pytorch.org/whl/rocm10.0

# Intel GPU (XPU) build
# pip install torch --index-url https://download.pytorch.org/whl/xpu

Source: https://pytorch.org/get-started/locally/ and https://download.pytorch.org/whl/ (the index names above were listed there on 2026-10-30).

Points to keep in mind:

  • Use exactly one index per command. Mixing --index-url with extra indexes can pull a CPU wheel for one package and a CUDA wheel for another.

  • torchvision, torchaudio and torchcodec are versioned together with torch. Install them in the same command so pip resolves a consistent set (see torchvision and torchaudio and TorchCodec).

  • Plain pip install torch from PyPI works too. The default build that PyPI serves depends on the operating system, so confirm what you got with the checks below rather than assuming (the get-started page documents the current defaults).

  • The same wheels work with uv pip install and with python -m pip in any environment manager; see Environment Setup for the environment tools used elsewhere in this site.

  • Nightly builds use the whl/nightly/<platform> indexes with --pre. Use them only to test unreleased features, which this site labels "upcoming".

Conda

The official pytorch Anaconda channel is deprecated: PyTorch 2.5 was the last release published there (upstream issue #138506). The recommended alternatives are the official wheels above, or community packages from conda-forge (pytorch-cpu, pytorch-gpu) for users who must stay on conda. Older tutorials that say conda install pytorch -c pytorch therefore install at most 2.5 or fail; see Legacy APIs and Migration.

Verifying the installation

import torch

print("torch          :", torch.__version__)
print("git version    :", torch.version.git_version)
print("CUDA runtime   :", torch.version.cuda)     # None on CPU, ROCm and XPU builds
print("HIP (ROCm)     :", torch.version.hip)      # None unless a ROCm build
print("cuDNN          :", torch.backends.cudnn.version())
print("accelerator    :", torch.accelerator.current_accelerator())
print("available      :", torch.accelerator.is_available())
print("CPU threads    :", torch.get_num_threads())

x = torch.randn(3, 3)
print((x @ x.T).shape)                           # smoke test on the CPU

torch.__version__ carries a local suffix that records the build, for example 2.15.0+cu132 for a CUDA wheel or +cpu for a Linux or Windows CPU wheel; the macOS wheels from PyPI carry no suffix (plain 2.15.0). torch.version.cuda is the CUDA version the wheel was built against, not the version of the driver. torch.accelerator.current_accelerator() returns the accelerator type that the build supports (cuda, xpu, mps, …​) or None. Device selection in detail is on Devices and Accelerators.

When torch.cuda.is_available() is False on a machine with a GPU, check in this order: the wheel is a CPU build (+cpu suffix or torch.version.cuda is None); the NVIDIA driver is older than the wheel needs (run nvidia-smi); the process cannot see the device (CUDA_VISIBLE_DEVICES empty, container started without GPU access); or the Python environment is not the one you think (python -c "import torch, sys; print(torch.__file__, sys.executable)").

Pinning for reproducibility

Record the whole stack, because a model trained on one release can behave differently on another because of changed kernels and defaults. Pin torch, the index and the Python minor version in a lock file, and log torch.__version__ and torch.version.cuda with every experiment. Bit-exact repeatability needs more than version pinning; see Reproducibility and Determinism. Older releases are installable by pinning, for example pip install torch==2.14.0 --index-url https://download.pytorch.org/whl/cu132, provided the index still carries that combination of version and platform; the previous-versions page on pytorch.org lists what exists.