Leroy
Programming

What is uv? A Next-Generation Python Package Manager

Leroy - Jun 1, 2026 - 3 min read

What is uv?

uv is a Python package and project manager written in Rust. It's designed to be a drop-in replacement for pip, pip-tools, pipenv, poetry, and pyenv - all in a single binary.

It was created by Astral, the same company behind Ruff (the fast Python linter). They saw that Python tooling was fragmented and slow, and applied the same Rust-powered approach that made Ruff successful.

What Does uv Replace?

Tool What it does uv replaces it with
pip Install packages uv pip install
venv / virtualenv Create virtual environments uv venv
pyenv Manage Python versions uv python install
pip-tools Pin dependencies uv lock / uv sync
poetry / pipenv Project management uv init / uv add
requirements.txt List dependencies pyproject.toml + uv.lock

One binary. No configuration juggling.

How is it So Fast?

uv is fast for three reasons:

  1. Written in Rust - The Rust compiler optimizes aggressively, and there is no Python interpreter overhead during dependency resolution
  2. Parallel downloads - pip downloads package metadata one at a time; uv fetches everything in parallel
  3. Global caching - Once uv downloads a package, it caches it globally. The next project that needs it gets it instantly, no network request

On a typical project with 50+ dependencies, pip install takes 30-60 seconds. The same with uv pip install takes 1-3 seconds.

Key Features

Python Version Management

# Install any Python version in seconds
uv python install 3.12
uv python install 3.10

# List installed versions
uv python list

# Pin a version for the current project
uv python pin 3.12

No more compiling Python from source or hunting for system packages. uv downloads pre-built binaries from the Astral cache.

Virtual Environments

# Create a virtual environment
uv venv

# Activate it (same as always)
source .venv/bin/activate

# Or skip activation entirely
uv run python myscript.py

The uv run command automatically uses the project's virtual environment without needing to activate it first.

Package Installation

# Install a single package
uv pip install flask

# Install from a requirements file
uv pip install -r requirements.txt

# Uninstall
uv pip uninstall flask

Works with any existing requirements.txt or pyproject.toml. No migration needed.

Project Management

# Create a new project
uv init my-project

# Add dependencies
uv add fastapi
uv add --dev pytest

# Sync the environment
uv sync

# Build for distribution
uv build

This creates reproducible builds with uv.lock (like Rust's Cargo.lock or npm's package-lock.json).

The Lock File

uv.lock is the killer feature for teams. It pins the exact version of every package and transitive dependency. When a teammate runs uv sync, they get precisely the same environment. No more "it works on my machine."

Who is uv For?

  • Python beginners - One tool to install, one command to set up a project
  • Team leads - Deterministic builds, no more environment drift
  • CI/CD pipelines - 10x faster installs means faster builds
  • Anyone tired of slow pip - The speed difference is dramatic

Limitations

  • Relatively new - First stable release in 2024. The ecosystem is still maturing
  • PyPI-only - Works with PyPI-compatible registries. Private repositories using other formats may need configuration
  • No ARM Windows builds - Windows on ARM users need the x86 emulation layer

Getting Started

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install Python
uv python install 3.12

# Create a project
uv init hello-world
cd hello-world
uv add flask
uv run python -c "import flask; print('ok')"

That's it. You have Python installed, a virtual environment, and a dependency - in under 10 seconds.

The Bottom Line

uv is what Python package management should have been all along. It's fast, it's simple, and it replaces half a dozen tools with one binary. If you write Python, try it.

Related Posts