What UV Replaces
| Old Tool | UV Equivalent | Speed Improvement |
|---|---|---|
| pip install | uv add |
10-100x faster |
| pip-compile | uv lock |
50x faster |
| virtualenv | uv venv |
80x faster |
| pyenv | uv python install |
Built-in |
| pipx | uv tool install |
Built-in |
| pip-sync | uv sync |
100x faster |
Project Management
# Initialize project with pyproject.toml
uv init my-app
# Add dependencies
uv add fastapi "sqlalchemy>=2.0"
uv add --dev pytest ruff
# Lock dependencies (reproducible builds)
uv lock
# Sync environment
uv syncPython Version Management
# Install Python versions
uv python install 3.12 3.11 3.10
# Pin project to specific version
uv python pin 3.12
# Run with any version
uv run --python 3.11 python script.pyScript Running
# Run scripts with inline dependencies
uv run --with pandas --with matplotlib python analyze.py
# Run from pyproject.toml
uv run pytest
uv run ruff check .Global Tool Installation
# Install CLI tools (like pipx)
uv tool install ruff
uv tool install black
uv tool install httpiePerformance Benchmarks
# Installing 50 packages:
pip: 45.2s
uv: 0.8s (56x faster)
# Resolving dependencies (Django project):
pip-compile: 12.3s
uv lock: 0.2s (61x faster)
# Creating virtualenv:
virtualenv: 2.1s
uv venv: 0.02s (105x faster)Key Stats
- 45,000+ GitHub stars
- By Astral (creators of Ruff)
- 10-100x faster than pip
- Replaces 5+ Python tools
- pip-compatible (reads requirements.txt)
FAQ
Q: What is UV? A: UV is a Rust-powered Python package manager that replaces pip, virtualenv, pyenv, and pipx with a single tool that is 10-100x faster.
Q: Is UV free? A: Yes, fully open-source under MIT/Apache 2.0 license.
Q: Is UV compatible with existing projects? A: Yes, UV reads requirements.txt, pyproject.toml, and setup.py. It is a drop-in replacement for pip.