You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[project]
name = "x"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
]
[project.optional-dependencies]
dev = [
"rich>=13.9.2",
]
This pyproject.toml was created with uv init. The rich dependency was added with:
uv add rich --optional dev
The problem:
uv pip install --extra dev . -vvvv
0.002785s DEBUG uv uv 0.4.25
error: Requesting extras requires a `pyproject.toml`, `setup.cfg`, or `setup.py` file.
The message implies that pyproject.toml file does not exist, but it is there.
Installing with
uv pip install .[dev]
works without any problem. Same directory, same venv.
The problem is: if pyptoject.toml exists and is valid, why the error message tells extra requires a pyproject.toml?
This also happens when a [project] section is not present in the pyproject, for example, when it is created with poetry. The error message is the same, even if the pyproject.toml is there and is used by other uv options.
In the first case RUST_TRACE and RUST_LOG do not help, the output is the same.
In the second case, missing project header, RUST_TRACE and RUST_LOG can be used to have a hint of the problem.
Can you please have a look if there is an error in uv pip install --help?
Can you please consider changing the error message to clearly indicate when a file does not exist and when it exists but is invalid or missing something?
Can you please confirm uv should be compatible with the pyproject.toml generated by poetry? (and when poetry is the specified builder).
The text was updated successfully, but these errors were encountered:
So the -r is missing when I use --extra. By the message I thought it wasn't finding the pyproject file itself.
It is also strange that pip install .[dev] works without the -r.
So we have two settings:
If I use the uv pip install .[dev] notation, I don't have to pass a -r and I should not use --extra.
If I use uv pip install -extra dev I have to pass the -r pyproject.toml.
Is this correct?
uv --version
0.4.45
also tested with version 0.4.22
OS: Windows 11 - WSL
pyproject.toml:
This pyproject.toml was created with
uv init
. The rich dependency was added with:The problem:
The message implies that pyproject.toml file does not exist, but it is there.
Installing with
works without any problem. Same directory, same venv.
The problem is: if pyptoject.toml exists and is valid, why the error message tells extra requires a pyproject.toml?
This also happens when a [project] section is not present in the pyproject, for example, when it is created with poetry. The error message is the same, even if the pyproject.toml is there and is used by other uv options.
In the first case RUST_TRACE and RUST_LOG do not help, the output is the same.
In the second case, missing project header, RUST_TRACE and RUST_LOG can be used to have a hint of the problem.
Can you please have a look if there is an error in
uv pip install --help
?Can you please consider changing the error message to clearly indicate when a file does not exist and when it exists but is invalid or missing something?
Can you please confirm uv should be compatible with the pyproject.toml generated by poetry? (and when poetry is the specified builder).
The text was updated successfully, but these errors were encountered: