Python 7 min read

uv vs Poetry
The New Python Toolchain War

A tale of two package managers: one battle-tested and beloved, the other shockingly fast. Which one should you actually be using, and does it even matter?

Shipping containers at port
Shipping containers · Unsplash · Ian Taylor

In 1956, a trucking entrepreneur named Malcolm McLean loaded fifty-eight identical metal boxes onto a converted tanker in Newark harbor. The longshoremen watching from the pier were skeptical. For decades, loading a cargo ship had meant armies of workers hand-carrying crates, barrels, and sacks into the hold — a skilled, labor-intensive process that kept ships in port for days at a time. Everyone accepted it as the cost of moving things across the ocean.

The shipping container did not change the cargo. The goods were the same, the ships were the same, the destinations were the same. What changed was the interface: one standard box, one standard crane, one standard locking mechanism. A ship that once spent a week in port could turn around in hours. Ports that rebuilt around the container became the busiest in the world. Ports that could not adapt lost traffic and eventually closed. The dockers who had mastered the old system were not doing anything wrong — they were doing it exactly right by every measure that had ever been applied. The new measure was simply throughput.

Python's package management story has a similar shape. Poetry arrived in 2018 and built something genuinely good: a single tool that replaced the tangled patchwork of pip, virtualenv, and setup.py with a clean, opinionated workflow that teams could actually rely on. Then in 2024, uv arrived — and changed the measure.

Python has never had a single blessed way to manage dependencies, and for a long time that was a problem. pip, virtualenv, pipenv, conda, pyenv — every team used a different combination and wrote a different setup guide. Poetry arrived in 2018 and began to change that. uv arrived in 2024 and changed the conversation again. Both are worth understanding.

What is Poetry?

Poetry is a Python dependency management and packaging tool that set out to solve a specific problem: the Python ecosystem had no single tool that handled project setup, dependency resolution, virtual environment management, and publishing in one coherent workflow.

Poetry's core idea is that everything about a project lives in pyproject.toml. Your dependencies, your dev dependencies, your Python version constraint, your project metadata, your build configuration — all in one place, all human-readable. A poetry.lock file captures the exact resolved versions of every package in the tree, meaning anyone who runs poetry install gets exactly the same environment.

Init & scaffold poetry new myproject or poetry init creates a pyproject.toml with project metadata and dependency sections.
Add deps poetry add requests resolves the package and its entire dependency tree, updates pyproject.toml and regenerates poetry.lock atomically.
Virtual env Poetry creates and manages a virtual environment automatically. You do not need to run python -m venv yourself; it is handled on first install.
Build & publish poetry build and poetry publish package your project and push it to PyPI in one step, without needing twine or setup.py.
Env scripts poetry run python script.py or poetry shell activates the environment, keeping your project isolated from system Python.

Poetry's resolver is careful and deterministic. It will refuse to install a set of packages that conflict with each other rather than silently picking one and hoping for the best. This strictness occasionally frustrates people when a package declares overly conservative version bounds, but it means you never ship a broken environment.

Poetry does not manage Python installations itself. It expects a compatible Python binary to already exist on the system (via system packages, pyenv, or similar). This is a deliberate scope decision: Poetry does one thing and does it well, leaving Python version management to tools built for that purpose.

What is uv?

uv is a Python package and project manager written in Rust by Astral, the same team behind Ruff. Where Ruff brought Rust-speed to Python linting, uv brings it to the entire package management stack. It was released in early 2024 and immediately attracted attention for one reason above all others: it is extraordinarily fast.

uv is not just a Poetry competitor. It is a replacement for an entire toolchain. In a single binary it covers what previously required pip, pip-tools, pipx, virtualenv, pyenv, and twine. You can use uv purely as a fast pip drop-in, or you can use its project-management layer which feels deliberately similar to Poetry.

Python mgmt uv python install 3.12 downloads and installs a specific Python version without needing pyenv or system packages. Works on Linux, macOS, and Windows.
Init & scaffold uv init myproject creates a pyproject.toml and a uv.lock file, structurally similar to Poetry's setup.
Add deps uv add requests resolves and installs the package, updating pyproject.toml and uv.lock. The resolver runs in parallel using Rust's async runtime, making it dramatically faster than pip or Poetry.
Global cache uv maintains a shared, content-addressed cache across all your projects. Once a wheel is downloaded, subsequent installs across projects hit the cache rather than the network — even across virtual environments.
Build & publish uv build and uv publish handle PyPI packaging and release, replacing twine without any additional configuration.
pip compat uv pip install -r requirements.txt works exactly as expected — you can adopt uv incrementally without changing any project configuration.

The speed claim is not marketing. Benchmarks show uv resolving and installing cold environments ten to a hundred times faster than pip, and significantly faster than Poetry's resolver, which is itself already more capable than raw pip. This matters most in CI pipelines, Docker builds, and data science environments where dependency trees are large and installs happen constantly.

"uv does not ask you to change how you think about Python projects. It asks you to stop waiting for them to install."

How They Compare

Both tools use pyproject.toml as their source of truth and both produce lockfiles that pin exact dependency versions. The surface similarities are real — but the differences matter depending on what you need.

Poetry

Battle-tested, opinionated, complete

  • Mature ecosystem with 6+ years of production use
  • Excellent documentation and community answers
  • Strict dependency resolver that catches conflicts early
  • Polished publishing workflow to PyPI
  • Groups support for optional and dev dependencies
  • Relies on existing system Python (pyenv-friendly)
  • Slower installs, especially for large trees
  • No built-in Python version management
uv

Blazing fast, batteries included, modern

  • 10–100x faster installs via Rust and parallel resolution
  • Downloads and manages Python versions natively
  • Global wheel cache shared across all projects
  • Drop-in compatible with pip and requirements.txt
  • Single binary, no Python install required to bootstrap
  • Replaces pyenv + pip + pipx + virtualenv + twine
  • Younger project; occasional rough edges remain
  • uv.lock format is not compatible with poetry.lock
Dimension Poetry uv Winner
Install speed Slower (Python resolver) 10–100x faster (Rust) uv
Python version management Not included Built in (uv python install) uv
Maturity & stability 6+ years, very stable Released 2024, maturing fast Poetry
Documentation & community Extensive, many Stack Overflow answers Growing, excellent official docs Poetry
CI/CD performance Good with caching Exceptional, even without cache uv
pip / requirements.txt compat Partial (via export) Full drop-in compatibility uv
Dependency conflict detection Strict, reliable Strict, on par with Poetry Tie
Publishing to PyPI First-class, well-documented Supported, slightly newer Poetry
Monorepo / workspaces Limited native support Workspace support built in uv
Tool consolidation Replaces pip + virtualenv Replaces pip + virtualenv + pyenv + pipx + twine uv

What to Use and When

There is no universally correct answer, but the patterns are reasonably clear once you know what each tool optimises for.

uv

New projects starting from scratch

If you are starting fresh, uv's project management layer gives you everything Poetry does plus Python version management and a faster resolver. There is no legacy to migrate and no muscle memory to override. uv init, uv add, and you are running.

uv

Data science and machine learning environments

PyTorch, TensorFlow, JAX, and their dependency trees are enormous. Installing them with pip or Poetry in a fresh CI runner can take several minutes. With uv and its global cache, that drops to seconds. For GPU-heavy teams running dozens of CI jobs a day, this translates directly to developer time and billing costs.

uv

CI/CD pipelines and Docker builds

uv is purpose-built for this use case. A single RUN pip install uv && uv sync in your Dockerfile installs your entire locked dependency tree in a fraction of the time. No cache layer tuning required to see dramatic improvements.

uv

Teams that want a single tool for everything

If you want to stop juggling pyenv, pip, virtualenv, and pipx and just have one thing that works, uv is the answer. It installs a Python version, creates the environment, manages dependencies, and runs scripts — no context-switching between tools.

Poetry

Projects already using Poetry with a happy team

If Poetry is working well for you, migration has a real cost and a low benefit. Poetry is actively maintained, its lockfile format is stable, and its resolver is reliable. Switching to uv mainly buys speed — worth it for new projects, harder to justify as a disruptive migration for a healthy existing codebase.

Poetry

Library authors with complex publishing needs

Poetry's poetry publish workflow has been used to publish thousands of packages to PyPI. It is well-documented, handles authentication via keyring, and supports private repositories. If your project's primary output is a published package rather than a deployed service, Poetry's publishing story is mature and reliable.

Poetry

Teams that value documentation and community answers

uv is excellent but young. When something goes wrong, the Stack Overflow answer and GitHub issue that matches your exact problem may not exist yet. Poetry has years of community troubleshooting accumulated across forums, blogs, and issue trackers. For teams with less Python tooling expertise, that breadth of available help matters.

Either

Web applications and backend services

For a typical Django or FastAPI backend, either tool works well. The choice comes down to team preference, whether you need Python version pinning in the project itself, and how often you are spinning up fresh environments. Both will produce reproducible deployments via their lockfiles.

A Note on Migration

Moving from Poetry to uv is intentionally low-friction. uv reads standard pyproject.toml files directly, so your dependency declarations transfer without changes. The main difference is the lockfile: poetry.lock and uv.lock are different formats, so you will run uv lock to generate a fresh lockfile from your existing pyproject.toml constraints. The resolved versions may differ slightly if newer compatible versions are available.

If you are not ready to commit, uv's uv pip subcommand is a painless first step. Swap pip install for uv pip install in your CI scripts and immediately get the speed benefit without touching your project tooling at all. That alone often cuts minutes off build times.

The Bigger Picture

The arrival of uv reflects a broader shift in the Python ecosystem. For years, Python tooling was written in Python — which made it approachable to contributors but meant it carried the same performance ceiling as the language itself. Rust-powered tools like Ruff and uv have demonstrated that you can have both: tools that feel like Python-native in their API and ergonomics, but perform like compiled systems software.

Poetry's influence on this trajectory should not be understated. It normalised the idea of a single, project-scoped tool with a lockfile and a clean CLI. uv inherited that design and accelerated it. The community is better for Poetry having existed, and better still that uv pushed the conversation forward.

For new projects in 2025 and beyond, uv is the tool to reach for first. It is fast, modern, actively developed, and removes more friction than anything else in the space. For teams with existing Poetry projects that are healthy and happy: there is no emergency. Poetry is not going anywhere, and the migration path will only get smoother over time.

The best tool is the one your team will actually use consistently. But if you are starting fresh and have no preference yet — you should try uv. Just once. You will notice the speed immediately.

Further reading