uv: The Python Package Manager That Makes pip and Poetry Feel Slow
A single Rust binary that replaces pip, pip-tools, virtualenv and often Poetry

Contents
I have rebuilt the same Python virtual environment often enough that I can tell you, without checking a clock, roughly how long pip install -r requirements.txt takes on a cold cache for a mid-sized data project: somewhere between ninety seconds and four minutes, depending on how many wheels need compiling and how annoyed my ISP is that day. I stopped noticing it the way you stop noticing a dripping tap. Then I installed uv on a whim after seeing the benchmark numbers, ran the same install, and it finished before I’d let go of the Enter key. That is the actual experience, and it is why this tool has earned a permanent place in every Python project I touch, homelab scripts included.
uv is a Python packaging tool written in Rust by Astral, the same team behind Ruff. It started as a drop-in replacement for pip and pip-tools, then grew into something closer to a full project and environment manager: it can create virtual environments, resolve and lock dependencies, install Python interpreters themselves, and run scripts with inline dependency declarations. The pitch sounds like every other “we rewrote it in Rust and it’s faster” story that’s flooded developer tooling for the past few years, and normally I’d be sceptical of a benchmark chart with no context. Here the difference isn’t marginal. It isn’t twenty percent. Real-world installs of dependency-heavy projects routinely land ten to a hundred times faster than pip, and the gap gets wider the bigger and messier your dependency tree is.
Why pip’s speed became a problem worth solving
pip’s resolver does a genuinely hard job: given a set of top-level requirements, work out a mutually compatible set of exact versions across a dependency graph that can run into the hundreds of packages, some of which publish dozens of incompatible constraint combinations. For years, that resolution was slow partly because it was naive — early pip would backtrack by re-fetching metadata over the network for every candidate version it considered, which meant resolution time scaled with your internet latency as much as with CPU. pip’s resolver has improved since 2020, but architecturally it’s still doing a lot of network round trips and a lot of work in Python itself, which is not the language you reach for when you want to walk a large dependency graph quickly.

Poetry, which many teams (including a chunk of my own scripts) adopted specifically because pip’s dependency resolution was unreliable, solved the correctness problem well but introduced its own performance cost: Poetry’s resolver is famously thorough and famously slow on large lockfiles, sometimes taking minutes to work out a fresh poetry.lock. I like Poetry’s lockfile discipline. I have never liked waiting for it.
uv attacks this from a different angle. It’s written in Rust, so the graph-walking and version comparison logic runs at native speed instead of interpreted Python speed. It caches aggressively and shares a single global package cache across every virtual environment on the machine, using hard links or copy-on-write clones instead of duplicating wheel files into every venv — which is also why disk usage drops noticeably once you’ve been using it for a while and have more than one project. And it parallelises downloads and builds far more aggressively than pip does by default. None of these are individually revolutionary ideas. Combined, in a compiled language, they add up to the kind of speed difference you notice from across the room.
What it actually replaces
uv covers ground that used to require several separate tools:
- pip — installing and uninstalling packages into an environment.
- pip-tools (
pip-compile/pip-sync) — locking arequirements.ininto a pinnedrequirements.txt. - virtualenv — creating isolated environments, and doing it faster than
python -m venv. - pyenv, partially — uv can download and manage standalone Python interpreter builds, so you don’t necessarily need a separate interpreter version manager. I still lean on mise for that side of things because it covers every language I touch. For a Python-only workflow, uv’s built-in interpreter management is genuinely enough on its own.
- Poetry, mostly —
uv init,uv add, and theuv.lockfile cover project-based dependency management with a proper lockfile, though Poetry still has a more mature plugin ecosystem and a more established publishing workflow if you’re shipping packages to PyPI regularly.
What it doesn’t replace is a build backend — you still need something like hatchling or setuptools declared in pyproject.toml to actually build your package, uv just orchestrates the process around it.
Setting it up
Installation is a single script, no separate Rust toolchain or package manager prerequisite:
| |
For a brand-new project, uv init scaffolds a pyproject.toml, a .python-version file, and a starter source layout:
| |
That last command is the detail that changed my daily habits the most. I no longer think about whether a shell has the right venv activated. uv run finds the project’s .venv relative to wherever pyproject.toml lives and runs the command inside it, which means I can cd into any of a dozen project directories and just run things.
Migrating a real project
The more common case for me wasn’t starting fresh, it was pulling an existing requirements.txt-based script collection into uv. The path that worked cleanly:
| |
uv sync is the command that reconciles .venv with whatever uv.lock says should be there — installing what’s missing, removing what shouldn’t be present, and leaving everything else untouched. It’s the equivalent of pip-sync, and it’s the command I run after pulling changes on a machine where the lockfile has moved on without me.
For projects coming from Poetry, there’s no fully automatic converter as of this writing, but the migration is mostly mechanical: copy the [project] metadata block across, move dependencies from Poetry’s [tool.poetry.dependencies] table into the standard PEP 621 [project.dependencies] list, and let uv lock generate a fresh uv.lock from that. It took me about twenty minutes per project the two times I’ve done it, most of that spent double-checking version pins carried across correctly rather than fighting the tool itself.
One habit worth adopting immediately: commit uv.lock to version control. It’s a fully deterministic, cross-platform lockfile — unlike requirements.txt generated by plain pip, which only pins what was resolved on whatever platform generated it. That determinism is the single biggest correctness win over bare pip, independent of speed.
Troubleshooting the rough edges
uv is young enough that I’ve hit a handful of genuine gaps, none fatal, all worth knowing about before they surprise you:
Editable installs and local path dependencies occasionally behave differently from pip when a package has an unusual build backend. If uv add fails on a local package with a cryptic build error that pip handled fine, check whether the package’s build backend is genuinely PEP 517 compliant — some older packages with custom setup.py logic still trip up uv’s stricter build isolation. The fix is usually adding --no-build-isolation for that one dependency, not abandoning uv.
Torch and other packages with platform-specific index URLs need explicit index configuration in pyproject.toml rather than the old --extra-index-url flag habit. This is the single most common “why won’t this install” question I’ve seen from people migrating, and it’s a five-line fix once you know uv wants indexes declared, not passed ad hoc on the command line.
Corporate or self-hosted package indexes work fine with uv’s index configuration, but if you’re pointing at an internal PyPI mirror behind authentication, get the credentials working with uv pip install in isolation before debugging a full project sync — it narrows down whether the problem is auth or something in your dependency graph.
Global cache corruption is rare, but if you ever see installs behaving inconsistently across projects that shouldn’t be related, uv cache clean resets the shared cache without touching any project’s lockfile or environment. I’ve needed this exactly once, after an interrupted download during a container image build.
A realistic Dockerfile pattern
The other place uv earned its keep is container builds, where install time directly costs CI minutes. This pattern cuts a typical dependency-installation stage from over a minute to a handful of seconds on a warm layer cache:
| |
--frozen is doing real work in that snippet. It turns a lockfile mismatch — someone edited pyproject.toml without regenerating uv.lock — into a hard build failure instead of a container that quietly installs something different from what’s pinned. That’s the kind of thing I’d otherwise have needed a separate CI check for.
Why the speed difference is architectural, not incidental
It’s worth being precise about where the time actually goes, because “it’s written in Rust” undersells what’s different. Three separate things changed:
First, dependency resolution itself. pip’s resolver, even the modern backtracking one, evaluates candidate versions largely in sequence and re-reads package metadata from the network as it goes when a candidate turns out to be incompatible. uv fetches metadata concurrently and holds the whole problem in memory as a proper constraint-satisfaction graph, so a resolution that would mean dozens of sequential HTTP round trips in pip becomes a handful of parallel ones in uv.
Second, the installation step. Once a resolution is settled, pip downloads and unpacks each wheel into the target environment one at a time by default. uv downloads wheels in parallel and, where the OS supports it, links files from its shared cache into the environment rather than copying bytes — which is why a second project using the same version of, say, numpy installs almost instantly: the bytes are already on disk, uv just needs a filesystem link, not a fresh copy.
Third, and easy to miss: uv doesn’t shell out to a separate process for environment creation the way python -m venv plus pip install effectively does. It’s one process managing the whole pipeline, which removes a surprising amount of process-spawn and Python-interpreter-startup overhead that adds up over hundreds of packages.
None of this is magic. It’s the kind of unglamorous systems engineering — concurrency, caching, avoiding redundant work — that Python’s own tooling could theoretically have done in pure Python. It’s just consistently faster to do in a compiled language with a proper async runtime underneath it, the same argument that’s been made for Ruff over Flake8 and for a handful of other Rust-rewritten developer tools over the past couple of years.
Workspaces for multi-package repos
If your homelab automation lives in one repository with several loosely related Python packages — a scraper, a Home Assistant integration helper, a shared library they both import — uv’s workspace support is worth knowing about even if you never touch a commercial monorepo. A workspace is declared once at the repository root:
| |
Every package under packages/ gets its own pyproject.toml, but they all share a single resolution and a single uv.lock at the root, and a package can depend on a sibling package by name without publishing it anywhere first. Before this, my multi-package scripts either lived in one sprawling requirements.txt with no real isolation between components, or I hand-rolled pip install -e ../shared-lib in a setup script that someone always forgot to re-run after a fresh clone. The workspace model removes that whole category of “did you remember to install the local package” bug, because uv sync at the root handles every member consistently.
Is it worth switching
For any new Python project, yes, without much hesitation. The speed difference alone changes how often I’m willing to rebuild an environment from scratch, which in turn makes me more willing to actually pin dependencies tightly rather than leaving a loose requirements.txt I’m scared to touch. The lockfile determinism is worth adopting even if you never notice the speed.
For existing Poetry projects that are working fine and don’t have a performance complaint, the migration is optional rather than urgent — Poetry remains a solid, mature tool, and if your team has muscle memory and CI pipelines built around it, there’s no burning need to move. Where I’d push harder is anywhere pip is still driving CI installs directly: that’s close to a free win, since the migration for a simple requirements.txt project is a few minutes and the payback shows up on every single pipeline run afterwards.
The one group I’d hold off recommending it to is anyone publishing packages to PyPI with a workflow that leans on Poetry-specific plugins for versioning or publishing — that tooling ecosystem hasn’t fully caught up yet, though it’s moving fast. Everyone else: it’s a genuine quality-of-life upgrade for the cost of one afternoon.




