Skip to content

pip 25.1 error when including a group dependency with underscore in name #13372

Closed
@user27182

Description

@user27182

Description

With pyproject.toml:

[dependency-groups]
foo_bar = []
eggs = [{ include-group = 'foo_bar' }]

Running

pip install . --group eggs

Raises this error:

ERROR: [dependency-groups] resolution failed for 'eggs' from 'pyproject.toml': Dependency group 'foo_bar' not found

Note that installing foo_bar works fine:

 pip install . --group foo_bar

Expected behavior

The install was expected to succeed.

pip version

25.1

Python version

3.12

OS

macOS

How to Reproduce

See above.

Output

See above.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions