pip install torch: No matching distribution found (tested)

ERROR: Could not find a version that satisfies the requirement torch (from versions: none) means no torch wheel matches your interpreter or platform. torch 2.14.1 ships wheels for CPython 3.10-3.14 on glibc Linux (x86_64/aarch64), Apple Silicon and 64-bit Windows only, with no source distribution. Python 3.15, Alpine, Intel Macs and 32-bit Python all hit this error.

1. Reproduce

b1.sh asks pip to resolve torch (metadata only, nothing is downloaded). It ran in two official Docker images: python:3-slim (Python 3.15, glibc) and python:3-alpine (Python 3.14, musl):

python -c "import sys, platform; print('Python', sys.version.split()[0], platform.libc_ver()[0] or 'musl')"
pip install --dry-run --no-deps torch 2>&1 | grep -v '^\[notice\]'
echo "pip exit status: ${PIPESTATUS[0]}"
### python:3-slim
Python 3.15.1 glibc
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
pip exit status: 1
### python:3-alpine
Python 3.14.7 musl
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
pip exit status: 1

Both fail identically with (from versions: none): pip found zero torch files it is allowed to install, for two different reasons.

2. Why: torch ships wheels only, for a fixed matrix

b2.py lists every file of the latest release from the PyPI JSON API:

# Which Python versions and platforms does the latest torch ship wheels for?
import json, urllib.request
d = json.load(urllib.request.urlopen("https://pypi.org/pypi/torch/json"))
print("torch", d["info"]["version"], "requires_python:", d["info"]["requires_python"])
print("sdist on PyPI:", any(f["packagetype"] == "sdist" for f in d["urls"]))
plats = {}
for f in d["urls"]:
    _, _, py, _, plat = f["filename"][:-4].split("-")
    plats.setdefault(plat, set()).add(py)
for plat, pys in sorted(plats.items()):
    print(f"{plat:28} {' '.join(sorted(pys))}")
torch 2.14.1 requires_python: >=3.10
sdist on PyPI: False
macosx_14_0_arm64            cp310 cp311 cp312 cp313 cp314
manylinux_2_28_aarch64       cp310 cp311 cp312 cp313 cp314
manylinux_2_28_x86_64        cp310 cp311 cp312 cp313 cp314
win_amd64                    cp310 cp311 cp312 cp313 cp314

There is no source distribution, so if no wheel matches, pip has nothing to fall back to. Read the table against your setup:

Check yours with python -c "import sys, platform, struct; print(sys.version, platform.machine(), platform.libc_ver(), struct.calcsize('P')*8, 'bit')".

3. Fix: a supported Python on a supported platform

# Fix: an environment on a supported Python (3.10-3.14, glibc Linux)
uv venv -q -p 3.13 tenv
tenv/bin/python --version
uv pip install -p tenv/bin/python --dry-run --no-deps torch 2>&1 | grep -E 'Would install|torch=='
# CPU-only build from PyTorch's own index
uv pip install -p tenv/bin/python --dry-run --no-deps torch --index-url https://download.pytorch.org/whl/cpu 2>&1 | grep -E 'torch=='
Python 3.13.5
Would install 1 package
 + torch==2.14.1
 + torch==2.14.1+cpu

Same machine, same index: with a 3.13 environment the resolver picks torch 2.14.1, and PyTorch's own CPU index resolves 2.14.1+cpu. Without uv, create the venv with a supported interpreter (python3.13 -m venv .venv) and, in Docker, use a glibc image such as python:3.13-slim instead of Alpine or the floating python:3-slim tag. For CUDA builds, copy the exact --index-url from the selector on pytorch.org.

Related: Torch not compiled with CUDA enabled, pip install tensorflow: no matching distribution found, pip install failed, pip error: externally-managed-environment.

Frequently asked questions

Why does pip say no matching distribution found for torch?

No torch wheel matches your Python version or platform, and there is no source distribution. torch 2.14.1 supports CPython 3.10-3.14 on glibc Linux, Apple Silicon macOS and 64-bit Windows.

Can I pip install torch on Alpine Linux?

Not from PyPI: torch publishes manylinux (glibc) wheels only, so pip on Alpine reports "from versions: none". Use a Debian-based image such as python:3.13-slim.

How do I install the CPU-only version of torch?

pip install torch --index-url https://download.pytorch.org/whl/cpu installs the +cpu build (2.14.1+cpu when tested).

Written with AI assistance. Measured on 2026-10-24 with pip in the python:3-slim (Python 3.15.1) and python:3-alpine (Python 3.14.7) Docker images, uv with Python 3.13.5, and the live PyPI JSON API on Linux x86_64. The scripts ran verbatim and the output was pasted unedited (blank lines removed). PlainTables is our extension; PyTorch and pip are free.