uv: uv add workspace fails misteriously from git but not locally
I tried to add as a dependency to a project a workspace that is found on git by doing
uv init
uv add git+https://github.com/NeuralQXLab/omnia --no-sync
this fails with the error
❯ uv add git+https://github.com/NeuralQXLab/omnia --no-sync
Updated https://github.com/NeuralQXLab/omnia (5d97a5b)
error: Requirements contain conflicting URLs for package `netket` in split `python_full_version == '3.12.*'`:
- file:///Users/filippo.vicentini/.cache/uv/git-v0/checkouts/75e22c3618b1966a/5d97a5b/external/netket
- file:///Users/filippo.vicentini/.cache/uv/git-v0/checkouts/75e22c3618b1966a/5d97a5b/external/netket
Instead, if I do the same but from a cloned version of the workspace, it just works
uv init
git clone https://github.com/NeuralQXLab/omnia
uv add ./omnia
While the workspace is private, the structure is something that looks like
# omnia/pyproject.toml
[project]
name = "omnia"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ipykernel>=6.29.5",
"netket",
"netket_pro",
"netket_checkpoint",
"deepnets",
]
[tool.uv]
dev-dependencies = [
"networkx>=3.4.2",
"pytest-xdist>=3.6.1",
"pytest>=8.3.3",
]
[tool.uv.sources]
netket = { workspace = true }
netket_pro = { workspace = true }
netket_checkpoint = { workspace = true }
deepnets = { workspace = true }
[tool.uv.workspace]
members = ["packages/*", "utils/*", "external/netket"]
exclude = ["utils/jax-rocm-autoinstall"]
However the error is not very telling, and I do not understand what I can do to fix it.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
Threw something up at #9388. If you think the PR makes sense I can get into writing some tests