uv: The Fastest Python Package Manager
2025-04-16T00:00:00.000Zโข10 min read
uv is a blazing-fast, all-in-one Python package and project manager built in Rust by the creators of Ruff. It aims to replace pip, pip-tools, pipx, virtualenv, poetry, pyenv, and twine โ in a single tool.
Highlights
- ๐ฅ 10โ100x faster than pip (Rust-powered, aggressive caching)
- ๐ Universal lockfile for reproducible environments
- ๐ง Drop-in pip replacement โ same commands, faster results
- ๐ฆ Manages Python versions โ like pyenv
- ๐๏ธ Cargo-style workspaces for mono-repos
Installation
# macOS / Linux (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"With pip or pipx
pip install uv
# or
pipx install uvTo update:
uv self updateHow to Use uv
1. Creating a new project
uv init myproject
cd myproject
uv add requests
uv run script.py- Initializes
pyproject.toml - Creates
.venvautomatically - Adds dependencies and runs the code
2. Using uv in an existing project
cd existing-project
uv venv # create/manage virtualenv
uv sync # install from lockfile
uv run app.py # run code inside env3. Full command reference
# Package management
uv add requests # Add a dependency
uv remove requests # Remove a dependency
uv sync # Install from lockfile
# Pip compatibility mode
uv pip install requests # Use pip commands
uv pip sync requirements.txt # Install requirements.txt
# Run scripts
uv run script.py # Run Python file in env
uv run "command" # Run shell command in venv
# Tools (like pipx)
uv tool install ruff # Install CLI tool globally
uvx pycowsay "hello world" # Run tool temporarily
# Scripts with inline metadata
uv add --script script.py requests # Inject deps into script
uv run script.py # Run it in isolated env
# Cache and maintenance
uv cache clean # Clear cache
uv self update # Update uv itselfPros and Cons
Pros
- Extremely fast (Rust-powered)
- Drop-in pip & pipx replacement
- All-in-one (env, deps, tools, Python)
- Global cache saves disk space
- Universal lockfile
- Great for mono-repos (Cargo-style workspaces)
Cons
- Still newer โ less battle-tested than pip/poetry
- Not all advanced Poetry features are available yet
- Smaller ecosystem of plugins/integrations
Conclusion
uv is not just fast โ it's a serious contender to unify the Python tooling ecosystem. Whether you're a beginner or managing large workspaces, it's worth trying. The speed improvement alone makes the switch worthwhile.