PyTorch CUDA (cu124) wheels do not exist for macOS / Apple Silicon

Author: bhuiyanmobasshir94Created Jun 29, 2026Updated Sep 6, 2026

Summary

On macOS (Apple Silicon), installing PyTorch from the CUDA wheel index fails. CUDA is not supported on macOS at all — there are no macosx_arm64 CUDA wheels. Apple Silicon uses the MPS (Metal) backend instead.

Steps to reproduce

uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Observed

The resolver fails — the cu124 index (https://download.pytorch.org/whl/cu124) only hosts CUDA 12.4 wheels for Linux/Windows + NVIDIA GPUs and contains no macOS wheels, so no matching distribution is found.

Root cause

CUDA requires an NVIDIA GPU and is unavailable on macOS. The cu124 index has no macOS builds. This command is copy/pasted from CUDA-based tutorials and is not valid on Mac.

Fix

Install from the default index (drop --index-url and any +cuXXX suffix). It serves the macOS arm64 build with MPS enabled:

uv pip install torch torchvision torchaudio

Verified result (macOS, Apple Silicon)

torch 2.12.1
CUDA avail: False     # expected — no NVIDIA GPU on Mac
MPS avail: True       # Metal GPU acceleration works
torchvision 0.27.1
torchaudio 2.11.0

In code, select the device portably:

import torch
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"

Repo state

requirements.txt is clean — it pins generic versions (torch>=2.0, torchvision>=0.15, torchaudio>=2.0) with no cu124 / --index-url, so it resolves correctly on macOS. The failure only occurs when following CUDA-specific install commands from external tutorials.

Suggested doc improvement

Apple Silicon note: Do not use PyTorch CUDA install commands (--index-url .../cu124, +cu124 pins) — there are no macOS CUDA wheels. Install with plain uv pip install torch torchvision torchaudio and use the MPS device.

How to regenerate

# Fails — no macOS CUDA wheels:
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

# Works — default index, MPS build:
uv pip install torch torchvision torchaudio
python -c "import torch; print(torch.__version__, 'MPS:', torch.backends.mps.is_available())"

Source: rohitg00/ai-engineering-from-scratch