UV does not fall back to other indexes when package lacks platform-compatible wheels
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:
- UV finds the package in the first index
- If that version lacks wheels for the current platform
- UV should check other configured indexes for the same version with compatible wheels
- UV should install from whichever index has platform-compatible wheels
Actual Behavior
Currently UV:
- Finds the package in the first index
- Attempts to install from that index only
- Fails with platform compatibility error
- Does not check other indexes for compatible wheels
Minimal Reproduction Example
uv.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 = truepyproject.toml:
[project]
name = "test-project"
dependencies = ["numpy==2.2.6"]Scenario:
- Private repository has
numpy==2.2.6with only Linux x86_64 wheels - PyPI has
numpy==2.2.6with macOS ARM64 wheels - Running
uv syncon 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 platformResult 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.6in 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
Source: astral-sh/uv