Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How should one install dev dependencies declared in pyproject.toml [dependency-groups] #9140

Closed
TonyYanOnFire opened this issue Nov 15, 2024 · 2 comments
Labels
question Asking for clarification or support

Comments

@TonyYanOnFire
Copy link

Hi.

I'm trying to introduce uv into my project. I did the following things to simulate the scenario of installing development dependencies when other members switch to using uv:

  1. uv add --dev pycowsay
  2. uv pip uninstall pycowsay
    At this point, pyproject.toml has:
[dependency-groups]
dev = [
"pycowsay>=0.0.0.1",
]

But pycowsay is not installed in the environment, just like what other members may encounter.
At this time, if you run uv pip install -r pyproject.toml, pycowsay will not be installed.
Trying to add --extra dev results in an error:

$ uv pip install -r pyproject.toml --extra dev
error: Requested extra not found: dev

How can I achieve my goal? Or am I trying to solve the wrong problem?

@charliermarsh
Copy link
Member

We don't support dependency groups in the uv pip interface right now. We've been waiting on pip itself so that we can align on a similar CLI. Dependency groups are only supported in uv sync, uv lock, etc.

In your case, you want uv sync --dev.

@charliermarsh charliermarsh added the question Asking for clarification or support label Nov 15, 2024
@charliermarsh
Copy link
Member

See also: #8590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants