Skip to content

Packages not installed on first uv run --extra with conflicting extras #9533

@eginhard

Description

@eginhard

A basic project with 2 conflicting extras (uv 0.5.5 on Ubuntu):

[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.9.0"
dependencies = []

[project.optional-dependencies]
t1 = ["tqdm==4.67.1"]
t2 = ["tqdm==4.67.0"]

[tool.uv]
conflicts = [
  [
    { extra = "t1" },
    { extra = "t2" },
  ],
]

If .venv/ and uv.lock are not present yet, the first execution of uv run --extra t1 python -c "import tqdm" results in ModuleNotFoundError: No module named 'tqdm'. It works the second time or when running e.g. uv lock before. It also works when the extras are not conflicting.

Metadata

Metadata

Assignees

Labels

needs-mreNeeds more information for reproduction, see #9452

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions