Skip to content

/compare/poetry/poetry-vs-uv

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

CriterionPoetry 2uv
Metadata[project] (PEP 621), plus [tool.poetry] for extras[project] (PEP 621), plus [tool.uv]
Lockfilepoetry.lockuv.lock (cross-platform, one file for all OSes)
Dev dependenciespoetry add --group devuv add --dev ([dependency-groups])
Installs Python itselfno (uses an existing interpreter; experimental python install command in 2.x)yes: uv python install, and automatic downloads
Virtual environmentIn a cache folder by default; virtualenvs.in-project for .venv.venv in the project by default
ImplementationPythonRust, single binary
SpeedSlower resolution and installsUsually much faster, with a global cache
Build backendpoetry-coreuv_build (or any backend)
Publishingpoetry publishuv publish
Run a tool onceno equivalent (use pipx)uvx TOOL
PluginsYes (poetry self add)No plugin system

Command mapping

TaskPoetryuv
New projectpoetry new NAMEuv init NAME
Add a dependencypoetry add requestsuv add requests
Removepoetry remove requestsuv remove requests
Install from the lockpoetry installuv sync
Lock onlypoetry lockuv lock
Check the lock in CIpoetry check --lockuv lock --locked (or uv sync --locked)
Run a commandpoetry run pytestuv run pytest
Show the treepoetry show --treeuv tree
Buildpoetry builduv build

Switching from Poetry to uv

  1. 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).
  2. Move groups from [tool.poetry.group.NAME.dependencies] to [dependency-groups].
  3. Run uv lock to create uv.lock, then uv sync.
  4. Delete poetry.lock once 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