Skip to content
X

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.

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.

Here is an example comparison from real projects. Results vary by environment.

OperationpipuvSpeed Ratio
pip install flaskAbout 3 secondsAbout 0.1 secondsAbout 30x
pip install -r requirements.txt (20 packages)About 30 secondsAbout 1 secondAbout 30x
First install without cacheSlowFast10-100x
Reinstall with cacheNormalVery fastTens of times faster

The main reasons for the speedup are:

  1. Rust implementation - It is written in a lower-level language than Python, so it can process faster
  2. Global cache - Once a package is downloaded, it is stored in cache, so it does not need to be downloaded again next time
curl -LsSf https://astral.sh/uv/install.sh | sh

After installation, restart your shell or run the following command to apply the path:

source ~/.bashrc   # for bash
source ~/.zshrc    # for zsh (default on macOS)
uv --version

If you see something like the following, installation succeeded:

uv 0.4.x (...)

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 uv
# 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.txt
# 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-env

The virtual environment created by uv defaults to .venv (a dot-prefixed name). Keep that in mind so you do not confuse it with venv.

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.py
uv pip list
uv pip freeze
uv pip show flask

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 sync

uv sync is similar to npm install; it automatically installs the dependencies listed in pyproject.toml.

SituationRecommended
Just starting with Pythonpip - simple and requires no extra installation
Want better speeduv - can greatly shorten installation time
CI/CD environmentuv - directly reduces build time
Working with AI tools or Claude Codeuv - matches fast setup well
Team already uses pipFollow the team’s policy
Managing a project with pyproject.tomluv - one-command setup with uv sync

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.txt

Most operations work the same way if you simply put uv in front of the command.

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.

  • 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 install for a pip-like experience
  • Use uv venv to create virtual environments and uv run to execute scripts
  • Combine it with pyproject.toml for one-command setup with uv sync
  • Beginners should start with pip and consider uv when speed or CI efficiency becomes important

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.