What is uv? A Python Package Manager
Leroy · 1 Jun 2026 · 3 min read
What is uv?
uv is a Python package and project manager written in Rust. It replaces pip, pip-tools, pipenv, poetry, and pyenv in a single binary.
It was created by Astral, the same company behind Ruff (the Python linter). They saw Python tooling was fragmented and slow, and applied the same approach that made Ruff work.
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 uv is Fast
- Written in Rust - No Python interpreter overhead during dependency resolution
- Parallel downloads - pip downloads package metadata one at a time; uv fetches everything in parallel
- 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
uv downloads pre-built binaries from the Astral cache. No compiling Python from source.
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 pins the exact version of every package and transitive dependency. When a teammate runs uv sync, they get precisely the same environment.
When to Use uv
- You are new to Python and want one tool to set up a project
- You work on a team and want deterministic builds
- You run CI/CD pipelines and want faster installs
- You are tired of slow pip
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.
Summary
uv is a Python package manager that is fast and simple. It replaces several tools with one binary. If you write Python, it is worth trying.