uv - Fast Python Package Manager
uv is a fast Python package manager implemented in Rust. It is developed and published by Astral.
It feels similar to pip, but it is 10 to 100 times faster than pip when installing packages. It is close to the relationship between pnpm and npm in the JavaScript world. It also handles virtual environment creation and management, and even Python version management, so one tool can cover the roles of pip + venv + pyenv.
Why uv Is Getting Attention
Section titled “Why uv Is Getting Attention”Python package management has long been dominated by pip. pip is reliable and stable, but installation time can become a problem as projects grow.
uv was designed to solve the following problems:
- Slow installs - dependency resolution and downloads are much faster than pip
- Fragmented tooling - you used to need several tools such as pip, venv, and pyenv
- Long CI build times - on repeated CI runs, reducing install time has a direct impact
In 2026, many projects and tools recommend uv, and because it works well with Claude Code by speeding up project setup, it is spreading as a standard tool for AI development.
Speed Compared with pip
Section titled “Speed Compared with pip”Here is an example comparison from real projects. Results vary by environment.
| Operation | pip | uv | Speed Ratio |
|---|---|---|---|
pip install flask | About 3 seconds | About 0.1 seconds | About 30x |
pip install -r requirements.txt (20 packages) | About 30 seconds | About 1 second | About 30x |
| First install without cache | Slow | Fast | 10-100x |
| Reinstall with cache | Normal | Very fast | Tens of times faster |
The main reasons for the speedup are:
- Rust implementation - It is written in a lower-level language than Python, so it can process faster
- Global cache - Once a package is downloaded, it is stored in cache, so it does not need to be downloaded again next time
Installation
Section titled “Installation”macOS / Linux
Section titled “macOS / Linux”curl -LsSf https://astral.sh/uv/install.sh | shAfter installation, restart your shell or run the following command to apply the path:
source ~/.bashrc # for bash
source ~/.zshrc # for zsh (default on macOS)Check the Version
Section titled “Check the Version”uv --versionIf you see something like the following, installation succeeded:
uv 0.4.x (...)Windows
Section titled “Windows”Run this in PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Install via pip (if you already have Python)
Section titled “Install via pip (if you already have Python)”pip install uvBasic Commands
Section titled “Basic Commands”Installing Packages
Section titled “Installing Packages”# Install a package (equivalent to pip install flask)
uv pip install flask
# Specify a version
uv pip install flask==3.0.0
# Install from requirements.txt
uv pip install -r requirements.txtVirtual Environment Management
Section titled “Virtual Environment Management”# Create a virtual environment (equivalent to python -m venv venv)
uv venv
# Activate it (this part is still the usual way)
source .venv/bin/activate # macOS / Linux
.venv\Scripts\activate # Windows
# Create with a custom name (default is .venv)
uv venv my-envThe virtual environment created by uv defaults to .venv (a dot-prefixed name). Keep that in mind so you do not confuse it with venv.
Running Scripts Directly
Section titled “Running Scripts Directly”With uv run, you can run scripts with dependencies resolved automatically, without manually activating a virtual environment.
# Run a script (no need to activate a virtual environment)
uv run python app.py
# Install a package just for the run and execute the script
uv run --with flask python app.pyChecking Installed Packages
Section titled “Checking Installed Packages”uv pip list
uv pip freeze
uv pip show flaskIntegration with pyproject.toml
Section titled “Integration with pyproject.toml”uv is also good at working with pyproject.toml, the configuration file for Python projects.
pyproject.toml is the file used to describe project metadata and dependencies in Python. It is similar to package.json in npm.
# Example pyproject.toml
[project]
name = "my-app"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"flask>=3.0.0",
"requests>=2.31.0",
]
[tool.uv]
dev-dependencies = [
"pytest>=8.0.0",
"black>=24.0.0",
]If a project has pyproject.toml, you can install all dependencies with:
uv syncuv sync is similar to npm install; it automatically installs the dependencies listed in pyproject.toml.
When to Use pip vs uv
Section titled “When to Use pip vs uv”| Situation | Recommended |
|---|---|
| Just starting with Python | pip - simple and requires no extra installation |
| Want better speed | uv - can greatly shorten installation time |
| CI/CD environment | uv - directly reduces build time |
| Working with AI tools or Claude Code | uv - matches fast setup well |
| Team already uses pip | Follow the team’s policy |
Managing a project with pyproject.toml | uv - one-command setup with uv sync |
Moving from pip to uv
Section titled “Moving from pip to uv”It is easy to introduce uv into an existing pip-based project. If you already have requirements.txt, you can keep using it.
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install using the existing requirements.txt file
uv pip install -r requirements.txtMost operations work the same way if you simply put uv in front of the command.
uv in AI Development in 2026
Section titled “uv in AI Development in 2026”In 2026, the AI development toolchain is evolving quickly. uv is especially valuable for AI developers for the following reasons:
Great with Claude Code: When Claude Code helps with project setup or dependency installation, uv’s speed matters. Even large machine learning libraries can be installed quickly.
AI libraries have complex dependencies: AI libraries such as PyTorch and TensorFlow often have complicated dependency trees and can take a long time to install with pip. uv’s cache and fast dependency resolution shorten the development cycle.
Movement toward standardization: Many AI tools and frameworks now recommend building environments with uv, and adoption across the ecosystem is growing.
Summary
Section titled “Summary”- uv is a fast Rust-based Python package manager, 10 to 100 times faster than pip
- Install it with
curl -LsSf https://astral.sh/uv/install.sh | sh - Use
uv pip installfor a pip-like experience - Use
uv venvto create virtual environments anduv runto execute scripts - Combine it with
pyproject.tomlfor one-command setup withuv sync - Beginners should start with pip and consider uv when speed or CI efficiency becomes important
Frequently Asked Questions
Section titled “Frequently Asked Questions”Q: Is uv a complete replacement for pip?
A: uv provides pip-compatible subcommands such as uv pip install, but it is not exactly identical. It is compatible with most use cases, although some advanced pip options are not supported. See the uv official documentation for the latest compatibility information.
Q: Should I learn pip first and then move to uv?
A: Yes. I recommend understanding the basic concepts of pip first, such as package installation, requirements.txt, and virtual environments. uv is a higher-level replacement, so pip knowledge still applies.
Q: Can uv manage Python versions too?
A: Yes. You can install a specific Python version with uv python install 3.12. That means uv can cover part of what pyenv does, reducing the number of tools you need. However, it does not replace all pyenv functionality, so pyenv may still be useful for more complex version management.
Q: What is the difference between conda (Anaconda) and uv?
A: conda is aimed at data science and can manage non-Python packages such as C libraries. uv focuses on Python packages and is known for speed and simplicity. For general AI / web development, uv is usually enough, but conda may be needed when you must get specific numerical libraries from conda channels.
Q: Is it free?
A: Yes. uv is open source and free to use under the MIT License.