#15298·uv

UV does not fall back to other indexes when package lacks platform-compatible wheels

Author: tejal567Created Aug 15, 2025Updated Sep 28, 2026
Labelsenhancement

Summary

Problem Description

When using multiple package indexes, UV fails to fall back to alternative indexes if a package exists in the first index but doesn't have wheels compatible with the current platform. This differs from Poetry's behavior and can cause installation failures for packages that should be available.

Expected Behavior

When a package exists in multiple indexes:

  1. UV finds the package in the first index
  2. If that version lacks wheels for the current platform
  3. UV should check other configured indexes for the same version with compatible wheels
  4. UV should install from whichever index has platform-compatible wheels

Actual Behavior

Currently UV:

  1. Finds the package in the first index
  2. Attempts to install from that index only
  3. Fails with platform compatibility error
  4. Does not check other indexes for compatible wheels

Minimal Reproduction Example

uv.toml:

toml
index-strategy = "unsafe-best-match"

[[index]]
name = "private-repo"
url = "https://private-repo.company.com/simple"

[[index]] 
name = "pypi"
url = "https://pypi.org/simple/"
default = true

pyproject.toml:

toml
[project]
name = "test-project"
dependencies = ["numpy==2.2.6"]

Scenario:

  • Private repository has numpy==2.2.6 with only Linux x86_64 wheels
  • PyPI has numpy==2.2.6 with macOS ARM64 wheels
  • Running uv sync on macOS ARM64

Result with both indexes:

error: Distribution `numpy==2.2.6 @ registry+https://private-repo.company.com/simple` 
can't be installed because it doesn't have a source distribution or wheel for the current platform

Result with only PyPI (private repo commented out):

✅ Successfully installed numpy==2.2.6 from PyPI (ARM64 wheels available)

This proves that PyPI has the compatible wheels, but UV doesn't fall back when the private repository lacks them.

Comparison with Poetry

Poetry handles this scenario correctly:

  • Finds numpy==2.2.6 in private repository
  • Detects lack of ARM64 macOS wheels
  • Automatically falls back to PyPI for the same version
  • Successfully installs compatible wheels

Impact

This limits UV adoption in enterprise environments where:

  • Private repositories contain internal packages + some public packages
  • Public packages in private repos may have limited platform support
  • Teams expect automatic fallback to public PyPI for missing platforms
  • Mixed development environments (Linux CI + macOS/Windows developers)

This behavior makes UV less flexible than Poetry for enterprises with mixed repository setups and multi-platform development teams.

Platform

Darwin 24.6.0 arm64 (MacOS)

Version

uv 0.8.11 (Homebrew 2025-08-14)

Python version

Python 3.10.17