Skip to content

Can't install torch_scatter wheel from index on OSX #9646

@dionhaefner

Description

@dionhaefner

It seems impossible to install torch_scatter CPU wheels using uv on OSX. I'm following the official installation instructions which require --find-links to be passed.

pyproject.toml:

[project]
name = "foo"
requires-python = ">=3.10"
dependencies = [
    "torch",
    "torch_scatter",
]
version = "0.1.0"

[tool.uv.sources]
torch = [{ index = "pytorch-cpu", marker = "platform_system != 'Darwin'" }]


[tool.uv]
find-links = [
    "https://data.pyg.org/whl/torch-2.5.1+cpu.html",
]

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

Results in this error:

$ uv venv
$ uv sync
⠙ Resolving dependencies...                                                                          
warning: Missing version constraint (e.g., a lower bound) for `torch-scatter`
Resolved 13 packages in 2.52s
error: Distribution `torch-scatter==2.1.2+pt25cpu @ registry+https://data.pyg.org/whl/torch-2.5.1+cpu.html` can't be installed because it doesn't have a source distribution or wheel for the current platform

It seems that uv is picking up torch-scatter==2.1.2+pt25cpu instead of the (compatible) torch-scatter==2.1.2 wheel. pip-based installation works:

$ uv pip install torch_scatter -f https://data.pyg.org/whl/torch-2.5.1+cpu.html
# all good

I'm really looking for any pyproject.toml here that doesn't lead to uv sync choking on OSX.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionAsking for clarification or support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions