Skip to content

Rye (with uv) succeeds but uv (standalone) fails to install pytorch aarch64 #9655

@niowniow

Description

@niowniow

Issue

Given the following pyproject.toml and python 3,11., I can install torch==2.5.1. on aarch64 with GPU support when I run rye sync but not when I run uv sync.

uv sync fails with

error: Distribution `torch==2.5.1+cu124 @ registry+https://download.pytorch.org/whl/cu124` can't be installed because it doesn't have a source distribution or wheel for the current platform

rye sync resolves to torch-2.5.1-cp311-cp311-manylinux_2_17_aarch64

How can this happen? is there a workaround?

pyproject.toml

[project]
name = "testproject"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [  
    "torch>=2.5.1",
        ]

[tool.uv.sources]
torch = [
  { index = "pytorch-cu124"},
]

[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true

[[tool.rye.sources]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu124"

Versions

uname -m -o -i -p
aarch64 aarch64 aarch64 GNU/Linux
$RYE_HOME/uv/0.4.25/uv --version
uv 0.4.25
rye --version
rye 0.42.0
commit: 0.42.0 (b8f472e15 2024-10-21)
platform: linux (aarch64)
self-python: cpython@3.11.10
symlink support: true
uv enabled: true

I tried with uv standalone version 0.4.25 and 0.5.6

Metadata

Metadata

Assignees

Labels

questionAsking for clarification or support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions