2025, Sep 19 01:00

How to install PyTorch on macOS: fix pip on Intel Macs, use conda for 2.x, and when to build from source

Stuck installing PyTorch on macOS? Fix pip errors on Intel Macs ('No matching distribution found'), use conda for 2.x, or build from source with version tips.

Installing torch on macOS can look deceptively simple until you switch hardware. On an M2-based Mac, a plain pip install works out of the box. On an Intel-based iMac with a Xeon CPU, the same command fails with “No matching distribution found.” Trying specific 2.x versions doesn’t help either. If you’re aiming for torch 2.8.0 on Intel macOS, here’s what’s actually happening and what to do instead.

Repro: what works and what doesn’t

On Apple Silicon (M-series), this succeeds:

pip install torch

On an Intel iMac, it fails with:

ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

Pinning a 2.x version doesn’t change the outcome:

pip install "torch==2.7.1"

…and you still get the same “No matching distribution found” error.

What’s going on

PyTorch dropped Intel macOS wheels on PyPI, which means pip install torch only works on Apple Silicon. On Intel Macs, pip can’t find a compatible prebuilt wheel for 2.x, so it reports that no matching distributions exist. Separately, the documentation notes that PyTorch 2.8.0 requires macOS 10.15 or newer; if you are below that, building from source is the remaining path.

How to install on Intel-based macOS

If you need torch 2.x on a Xeon iMac, use conda from the official pytorch channel:

conda install pytorch torchvision torchaudio -c pytorch

If you must stay with pip on Intel macOS, use the last pip release that offered Intel wheels:

pip install torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1

If you require torch 2.x specifically and cannot use conda, you’ll need to build from source.

Why this matters

Package availability depends on architecture and distribution channels. Apple Silicon receives native wheels on PyPI, so pip is a one-liner. Intel macOS, however, no longer has those wheel artifacts for torch 2.x on PyPI, which changes the installation strategy. Knowing where wheels are published—and where they aren’t—saves hours of chasing version pins that will never resolve.

Practical takeaways

First, decide whether you need torch 2.x or just a stable torch for development. For 2.x on Intel macOS, prefer conda from the pytorch channel. If pip is a hard requirement on Intel, install the last supported line with torch==1.13.1, torchvision==0.14.1, and torchaudio==0.13.1. When neither fits the bill, proceed with building from source. Also make sure your macOS version meets the documented minimum for the torch version you want.

With the right path—conda for 2.x on Intel, pinned pip for legacy, or a source build when necessary—you can get PyTorch running reliably without guesswork.

The article is based on a question from StackOverflow by Ramrab and an answer by Mario.