uv icon indicating copy to clipboard operation
uv copied to clipboard

`uv pip install --group` fails where `pip install --group` succeeds

Open leodevian opened this issue 7 months ago • 3 comments

Summary

Hello,

It seems that uv pip install --group and pip install --group (pip 25.1) have different behaviors for installing Dependency Groups.

[dependency-groups]
dev = [
  "ruff",
]
$ uv pip install --group dev
warning: `.\scripts` does not appear to be a Python project, as the `pyproject.toml` does not include a `[build-system]` table, and neither `setup.py` nor `setup.cfg` are present in the directory
error: The dependency group 'dev' was not found in the project: pyproject.toml
$ pip install --group dev
Collecting ruff
  Using cached ruff-0.11.7-py3-none-win_amd64.whl.metadata (26 kB)
Using cached ruff-0.11.7-py3-none-win_amd64.whl (11.6 MB)
Installing collected packages: ruff
Successfully installed ruff-0.11.7

As PEP 735 specifies that Dependency Groups support non-package projects and that the installation of a Dependency Group does not imply installation of a package's dependencies or the package itself, I believe that the behavior of pip is the expected behavior.

Thank you 🙏

Platform

Windows 11 amd64

Version

uv 0.6.17 (8414e9f3d 2025-04-25)

Python version

Python 3.13.2

leodevian avatar Apr 27 '25 20:04 leodevian