Stop Using Pip: Why I Switched to “uv” for Python Projects (10x Faster)

Published: (January 1, 2026 at 05:49 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

Why the Hype?

  • Ridiculously fast – written in Rust, uv resolves dependencies and installs packages in milliseconds where pip can take seconds or minutes.
  • Cold install: ~10–100× faster than pip.
  • Warm install: essentially instant.
  • Disk usage: uses a global cache, so you don’t store the same package (e.g., NumPy) multiple times on disk.

Step 1: Installing uv

Windows (PowerShell)

irm https://astral.sh/uv/install.ps1 | iex

macOS / Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

Step 2: The “Magic” of uv run

source venv/bin/activate is no longer needed. With uv, you simply create a script and run it; uv automatically creates a temporary environment, installs any missing imports, runs the script, and cleans up.

Create a file hello.py:

import requests
print(requests.get("https://api.github.com").status_code)

Run it:

uv run hello.py

uv detects that requests is required, installs it in a cached environment, and executes the script instantly.

Step 3: Migrating a Project (requirements.txt)

Old way

pip install -r requirements.txt

New way

uv pip install -r requirements.txt

uv respects your existing virtual environment but performs the installation significantly faster.

Step 4: Initializing a New Project

uv init my-new-project
cd my-new-project
uv add pandas fastapi

This creates a pyproject.toml file automatically, eliminating the need for complex setup.

In 2025, speed matters. uv removes the friction of managing Python environments, letting you focus on coding—not waiting.

Back to Blog

Related posts

Read more »

How uv got so fast

Article URL: https://nesbitt.io/2025/12/26/how-uv-got-so-fast.html Comments URL: https://news.ycombinator.com/item?id=46393992 Points: 108 Comments: 30...