Tutorials

uv: One Tool for Python Versions, Virtualenvs and Packages (The 10-Minute Setup That Replaces pip + venv + pyenv)

· Tutorials

uv replaces pip, venv, and pyenv with one Rust binary: install it, pin a Python version, manage a project, and know where pip still wins.

uv: One Tool for Python Versions, Virtualenvs and Packages (The 10-Minute Setup That Replaces pip + venv + pyenv)

Last updated: November 13, 2026 · 6-minute read

91,717 GitHub stars for a package manager — because the package manager deletes three other tools from your day. uv, from Astral, is one Rust binary that installs Python versions, creates virtual environments, resolves dependencies, and locks them, at speeds its own benchmarks put at 10 to 100 times faster than pip. This guide installs it, pins a Python, runs a project through it, and then says plainly where the old tools still earn their keep.

The Python tooling tax is death by a thousand cuts. pyenv for versions, venv for environments, pip for packages, pip-tools for locking, pipx for tools — five tools, five configs, five failure modes. uv's claim is not a new feature. It is subtraction: one binary, one cache, one lockfile, and the README lists the tools it aims to replace without blushing — pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more.

Install It in One Step

uv installs without needing Rust or Python already present. The standalone installer is the documented route:

# Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

PyPI works too — pip install uv, or pipx install uv if you want it isolated. Installed via the standalone route, uv updates itself:

The current release line is 0.13.7, published November 3, 2026. uv is dual-licensed Apache-2.0 and MIT, runs on macOS, Linux, and Windows, and Astral — the team behind the Ruff linter — backs it commercially. That last point matters for a tool you are about to put in charge of every environment you own.

Pin the Python You Actually Want

This is the pyenv replacement, and it is two commands:

The first line installs multiple Python versions side by side — the README's example lands three versions in under a second on its test machine. The second writes a .python-version file in the current directory, so the project states its interpreter instead of inheriting whatever your shell happens to find. No shell shims, no global-versus-local arguments with yourself six months later.

Need an environment the old way? That survives too:

uv downloads a Python build when the version you asked for is not present. One less installer to hunt down before the real work starts.

Run a Project the uv Way

The project interface is where uv stops being a faster pip and becomes a different workflow:

$ cd example

$ uv add ruff Creating virtual environment at: .venv Resolved 2 packages in 170ms Installed 2 packages in 1ms + ruff==0.5.0

$ uv run ruff check All checks passed!

Three habits replace the old ritual. uv add records the dependency in pyproject.toml and updates the lockfile. uv run executes inside the project's environment without an activation step — no source .venv/bin/activate, no finding yourself in the wrong shell. uv lock and uv sync handle resolution and installation as separate, explicit acts, and the lockfile is universal: one uv.lock covers the platforms your team actually ships to, instead of a requirements file resolved for whichever machine generated it.

Two more workflows round out the replacement claim. Single-file scripts carry their dependencies as inline metadata, and uv run script.py builds an isolated environment for them on the fly — a script becomes a self-contained artifact instead of a README apology. And uvx, the pipx replacement, runs command-line tools from Python packages in throwaway environments: uvx pycowsay 'hello world' works, and uv tool install ruff keeps a tool permanently when it earns the place.

Keep Your pip Habits, If You Want

Migration does not have to be a flag day. uv ships a pip-compatible interface for the commands your fingers already know:

The README calls it a drop-in replacement for common pip, pip-tools, and virtualenv commands — note the word common, because the caveats below take it seriously. The speed difference in this mode comes from the same machinery: a fast resolver (PubGrub, per the README's acknowledgements) and a global cache that deduplicates packages across every environment on the machine, so the tenth project does not download what the first nine already paid for.

TL;DR

  • uv (Astral, Apache-2.0/MIT, 91,717 stars as of November 13, 2026) replaces pip, pip-tools, pipx, poetry, pyenv, twine, and virtualenv with one Rust binary
  • Install with the standalone installer — no Rust or Python needed first — or from PyPI; current release 0.13.7
  • uv python install and uv python pin retire pyenv; uv venv retires the venv ritual
  • Projects get pyproject.toml plus a universal uv.lock; uv run skips environment activation entirely
  • Scripts declare dependencies inline; uvx runs tools without installing them
  • The pip-compatible interface keeps existing workflows working while you migrate

Where It Falls Short

The honest answer: uv is the best default for new Python work, and a migration decision — not a free lunch — for established stacks.

  • The speed numbers are the vendor's. The 10 to 100 times figure comes from Astral's own benchmark file, and its headline chart is captioned with a warm cache. A warm global cache is exactly where uv shines; a cold CI runner narrows the gap. The tool is fast. The multiplier is marketing until your workload confirms it.
  • Drop-in has a scope limit, and the README states it. The pip interface covers common commands. Exotic pip behaviours, legacy setup.py oddities, and the long tail of packaging edge cases are where migrations go to spend their saved time. Test your ugliest project first, not your cleanest.
  • The lockfile is uv's, not the ecosystem's. uv.lock is a uv format. A team standardised on Poetry or pip-tools is not swapping a command; it is swapping a contract that CI, deployment, and every contributor's muscle memory already signed.
  • Two interfaces are one too many for beginners. Project mode and pip mode overlap just enough to confuse: uv add versus uv pip install do different things to different files, and most early uv frustration is that sentence learned the hard way.
  • Your Python arrives from uv's builds. Managed Pythons are downloaded builds maintained through the python-build-standalone ecosystem, not installers from python.org. For nearly everyone that is invisible. For regulated environments with strict provenance rules, it is a review item, not a footnote.

The Verdict

uv retires more daily friction than any Python tool in years, and it does it with the paperwork in order: open license, a real company behind it, a resolver with a published algorithm, and documentation that names its own scope limits. Start new projects on it. Migrate old ones at the speed your lockfile allows.

It pairs naturally with the rest of the agent stack on this site — MarkItDown feeds files to your models, the FastMCP guide serves them tools, and uv keeps the Python underneath both from becoming a second job. The full toolkit lives on the projects page.

---

Not affiliated with Astral. Sources: uv GitHub repository, including its README, highlights, and installation sections, and the uv documentation.

ansaribilal.com — technology, tested in public.