Poetry vs uv: which Python project manager to use
The commands on this page have not been executed by our verification runner yet.updated
- tool
- Poetry
- compares
- Poetry vs uv
Both tools manage a Python project from pyproject.toml, resolve dependencies into a lockfile and run commands in a project virtual environment. Pick uv for speed and an all-in-one tool (it also installs Python versions, runs one-off tools and replaces pip and pipx). Pick Poetry when the team already uses it or relies on its plugins and publishing workflow. Since Poetry 2 both read standard [project] metadata, so moving between them is mostly a matter of regenerating the lockfile.
Side by side
| Criterion | Poetry 2 | uv |
|---|---|---|
| Metadata | [project] (PEP 621), plus [tool.poetry] for extras | [project] (PEP 621), plus [tool.uv] |
| Lockfile | poetry.lock | uv.lock (cross-platform, one file for all OSes) |
| Dev dependencies | poetry add --group dev | uv add --dev ([dependency-groups]) |
| Installs Python itself | no (uses an existing interpreter; experimental python install command in 2.x) | yes: uv python install, and automatic downloads |
| Virtual environment | In a cache folder by default; virtualenvs.in-project for .venv | .venv in the project by default |
| Implementation | Python | Rust, single binary |
| Speed | Slower resolution and installs | Usually much faster, with a global cache |
| Build backend | poetry-core | uv_build (or any backend) |
| Publishing | poetry publish | uv publish |
| Run a tool once | no equivalent (use pipx) | uvx TOOL |
| Plugins | Yes (poetry self add) | No plugin system |
Command mapping
| Task | Poetry | uv |
|---|---|---|
| New project | poetry new NAME | uv init NAME |
| Add a dependency | poetry add requests | uv add requests |
| Remove | poetry remove requests | uv remove requests |
| Install from the lock | poetry install | uv sync |
| Lock only | poetry lock | uv lock |
| Check the lock in CI | poetry check --lock | uv lock --locked (or uv sync --locked) |
| Run a command | poetry run pytest | uv run pytest |
| Show the tree | poetry show --tree | uv tree |
| Build | poetry build | uv build |
Switching from Poetry to uv
- Make sure dependencies are in the
[project]table (Poetry 2 projects already are; Poetry 1 projects keep them in[tool.poetry.dependencies]and need converting). - Move groups from
[tool.poetry.group.NAME.dependencies]to[dependency-groups]. - Run
uv lockto createuv.lock, thenuv sync. - Delete
poetry.lockonce CI uses uv.
Version constraints written with Poetry's caret syntax (^2.0) are not valid in [project]; rewrite them as PEP 440 ranges (>=2.0,<3.0).
Sources
Related pages
commands · poetrypoetry add --group dev pytest: add a development dependencypoetry add --group dev pytest records a development-only dependency; Poetry 2 writes it to [dependency-groups]. poetry install --without dev leaves it out.commands · uvuv init: create a new Python project with uvuv init NAME creates a Python project with pyproject.toml, README, .python-version and git. The --app, --lib, --package, --bare and --script layouts compared.config · poetryPoetry virtualenvs.in-project: create .venv inside the projectpoetry config virtualenvs.in-project true makes Poetry create the virtualenv as .venv in the project instead of its cache. Set it with --local or an env var.