Blog
8 min read

uv vs pip: What uv Replaces, When pip Is Still Fine, and Where Poetry, conda and venv Fit

uv vs pip compared: what uv is, project mode with uv.lock, the uv pip interface, uvx, Python installs, migrating from requirements.txt, and Poetry and conda.

pip installs packages into whatever Python environment you point it at, and that's all it does. uv, from Astral, is a single Rust binary that installs packages too, but also creates virtual environments, locks dependencies in uv.lock, installs Python itself and runs command-line tools. For a new project, uv is the more complete tool. pip is still a sensible choice when you only need to install a few packages into an environment you already manage, or when you can't add another binary to the machine.

Checked against the uv documentation, the pip documentation (v26.3), the Poetry docs and the conda docs in November 2026.

The short version

pip uv
What it is The standard package installer, bundled with most Python installs via ensurepip A package and project manager written in Rust, by Astral
Installs packages Yes Yes (uv add, or uv pip install)
Creates virtual environments No (that's python -m venv) Yes, automatically in project mode, or uv venv
Lockfile pip lock writes pylock.toml, marked experimental uv.lock, cross-platform, the normal workflow
Installs Python versions No Yes (uv python install)
Runs tools without installing them No (pipx does this) Yes (uvx)
Installs into system Python by default Yes, unless the OS blocks it No, needs --system
Licence MIT MIT or Apache-2.0

Astral describes uv as "10-100x faster than pip" and positions it as one tool to replace pip, pip-tools, pipx, Poetry, pyenv, twine and virtualenv. That speed figure is Astral's own claim; uv also keeps a global cache so the same wheels aren't downloaded twice.

uv is still versioned 0.x (0.13 at the time of writing), so read the changelog before upgrading in CI.

Two ways to use uv

uv has two interfaces, and mixing them up is the most common source of confusion.

Project mode: uv add, uv sync, uv run

For new projects:

uv init my-app          # creates pyproject.toml, .python-version, README.md
cd my-app
uv add requests         # adds to pyproject.toml, updates uv.lock and .venv
uv add --dev pytest     # development-only dependency
uv run python main.py   # runs inside the project environment
uv run pytest

What happens behind the scenes:

  • pyproject.toml holds your direct dependencies with broad version ranges.
  • uv.lock records the exact resolved version of every package, for every platform. The uv docs say it should be committed to version control and not edited by hand.
  • uv run checks that the lockfile matches pyproject.toml and that the environment matches the lockfile before every command. You never need to activate the environment.
  • uv sync brings .venv exactly in line with the lockfile, removing packages that aren't in it. In CI, uv sync --locked fails if the lockfile is out of date instead of silently updating it.

The pip interface: uv pip ...

If you have an existing pip workflow and just want it faster, uv offers pip-shaped commands:

uv venv                               # create .venv
uv pip install -r requirements.txt
uv pip compile requirements.in -o requirements.txt   # pip-tools style
uv pip sync requirements.txt

It is close to pip but not identical. The uv pip compatibility page lists the differences, and these are the ones people trip over:

  • uv pip install targets a virtual environment by default. Installing into the system interpreter needs --system.
  • uv does not support --user.
  • uv does not read pip.conf or PIP_* environment variables. Private index settings need to move to UV_INDEX_URL, uv.toml or [tool.uv] in pyproject.toml.
  • With several package indexes, uv by default only takes a package from the first index that has it, to guard against dependency confusion attacks. pip merges candidates from all indexes. If you rely on pip's behaviour, --index-strategy unsafe-best-match is the closest match, with the risk the name implies.

Python versions: uv python install

uv can download and manage Python builds, using Astral's python-build-standalone distributions:

uv python install 3.12
uv python pin 3.12      # writes .python-version for this project

By default uv downloads a missing Python version automatically when a project asks for one, though it prefers a suitable Python already on the system over downloading. This replaces pyenv for most people. uv python install puts a versioned executable such as python3.12 on your PATH; the plain python and python3 names need the experimental --default flag.

uvx: running tools without installing them

uvx is an alias for uv tool run. It runs a Python command-line tool in a temporary, isolated environment:

uvx ruff check .
uvx ruff@0.9.0 check .          # exact version
uvx --from httpie http example.com   # package name differs from command

For tools you use every day, uv tool install ruff installs them persistently and puts them on your PATH, which is what pipx does.

One rule from the uv docs: if a tool needs to import your project, such as pytest or mypy, use uv run pytest, not uvx pytest. uvx runs in an environment that can't see your project's dependencies.

uv vs venv

venv is the standard library module that creates virtual environments; you pair it with pip. uv creates the same standard .venv for you, so this is less a competition than uv doing the venv step. With the uv pip interface, uv venv replaces python -m venv .venv. For the basics of why environments matter, see Python virtual environments explained.

uv vs Poetry

Poetry got there first: pyproject.toml, a lockfile (poetry.lock), poetry add, poetry run. Since Poetry 2.0 it supports the standard [project] table for dependencies, and 2.1 added experimental commands for installing Python versions.

uv adds tool running (uvx) and a pip-compatible interface, and Astral's benchmarks show it resolving and installing faster. Poetry has a plugin system and a longer track record. A working Poetry project has no urgent reason to move; if you do, the main work is converting [tool.poetry] sections to standard [project] metadata and regenerating the lock with uv lock.

uv vs conda

This one is a different category. conda, in its own docs' words, provides "package, dependency, and environment management for any language". A conda package can contain system-level libraries and executable programs, not only Python modules. That is why data science and scientific computing teams use it: CUDA toolkits, compiled geospatial libraries, R, and other non-Python dependencies come from the same package manager.

uv installs Python packages from PyPI. If your pain is "this wheel needs a system C library I don't have", uv can't fix that, and conda (often via conda-forge) can. If everything you need ships as PyPI wheels, uv is simpler and faster.

When pip is still fine

  • Inside a Dockerfile that installs a pinned requirements.txt once. pip is already in the official Python images. uv will be faster, but for a small image the difference may not justify another tool.
  • On a machine where you can't install anything extra, such as a locked-down server or a course environment.
  • Teaching beginners. python -m venv plus pip install shows what an environment is. uv hides that step.

pip is not standing still either: pip lock now writes the standardised pylock.toml format, though the pip docs still mark it experimental and say the file is only guaranteed valid for the current Python version and platform.

Migrating from requirements.txt to uv

If you have a requirements.txt (see requirements.txt explained), the uv migration guide's approach keeps your existing pinned versions:

uv init                                  # adds pyproject.toml if missing
uv add -r requirements.txt               # direct dependencies into pyproject.toml
uv add --dev -r requirements-dev.txt     # if you have one
uv run pytest                            # check everything still works

If your requirements.txt came from pip freeze, it lists every transitive package too, and uv add -r will turn all of them into direct dependencies. Trim it to the packages you actually import first.

If you use pip-tools with a loose requirements.in and a pinned requirements.txt, run uv add -r requirements.in -c requirements.txt instead. The pinned file acts as constraints, so your current versions carry over into uv.lock.

Commit pyproject.toml and uv.lock. If a deploy platform still expects a requirements file, generate one from the lock:

uv export --format requirements.txt > requirements.txt

Then tell your CI and any AI coding agent instructions to use uv add and uv run, or someone will pip install into the wrong environment. If you hit "externally-managed-environment" on the way, that error has its own guide.

Which one to pick

  • New project, application or service: uv in project mode.
  • Existing pip + requirements.txt project: start with uv pip install -r requirements.txt for speed, move to project mode when you want a lockfile.
  • Existing Poetry project that works: stay, unless install time or Python version management is a real pain.
  • Heavy native or non-Python dependencies: conda (or a conda-based tool), possibly with pip or uv for the PyPI-only parts.
  • Quick install into an environment you already have: pip.

EasySpawn servers keep your project directory, .venv and uv's cache on persistent storage, so an environment Claude Code sets up today is still there tomorrow and installs stay warm. See how it works or join the waitlist.

Related: Python Virtual Environments Explained: venv, pip, and uv for Beginners · requirements.txt Explained: Python Dependencies for Beginners · pip "error: externally-managed-environment": What It Means and How to Fix It · Python "ModuleNotFoundError: No module named ...": How to Fix It

Keep reading