uv add vs uv pip install: What’s the Difference?

The difference in uv add vs uv pip install is where the change is recorded. uv add writes the package into pyproject.toml and uv.lock, then installs it. uv pip install only installs into the environment, like pip, and leaves no record:

uv add requests            # project dependency: pyproject.toml + uv.lock + .venv
uv pip install requests    # just this environment, nothing recorded

I ran both with uv 0.12.22 on Windows 11, using a uv-managed Python 3.13, and checked what changed in the files after each command.

We’ll create a project and use uv add, try uv pip install and watch uv sync undo it, remove a dependency, and see where the pip interface still fits.

uv add: project dependencies

uv add belongs to uv’s project workflow. It updates pyproject.toml, resolves everything into uv.lock, and syncs .venv in one step:

uv init --app --name shop
uv add tabulate
type pyproject.toml

Output:

Initialized project `shop`
Using CPython 3.13.16
Creating virtual environment at: .venv
Resolved 2 packages in 4ms
   Building shop @ file:///C:/pyguides/shop
      Built shop @ file:///C:/pyguides/shop
Prepared 1 package in 17ms
Installed 2 packages in 15ms
 + shop==0.1.0 (from file:///C:/pyguides/shop)
 + tabulate==0.10.0
[project]
name = "shop"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
    "tabulate>=0.10.0",
]

[project.scripts]
shop = "shop:main"

[build-system]
requires = ["uv_build>=0.12.22,<0.13.0"]
build-backend = "uv_build"
Command Prompt output of uv init and uv add tabulate creating a virtual environment and adding the dependency to pyproject.toml
uv created .venv, installed tabulate, and wrote tabulate>=0.10.0 into dependencies.

Commit pyproject.toml and uv.lock, and teammates get identical versions with uv sync. The pip side of pyproject.toml is covered in pip install from pyproject.toml.

uv pip install: just the environment

uv pip install is uv’s fast, pip-compatible interface. It installs into the active or project environment but doesn’t touch pyproject.toml or the lockfile. Watch what uv sync does next:

uv pip install humanize
uv pip list
uv sync
uv pip list

Output:

Resolved 1 package in 2ms
Installed 1 package in 48ms
 + humanize==4.16.0
Package  Version Editable project location
-------- ------- -------------------------
humanize 4.16.0
shop     0.1.0   C:\pyguides\shop
tabulate 0.10.0
Resolved 2 packages in 0.91ms
Uninstalled 1 package in 24ms
 - humanize==4.16.0
Package  Version Editable project location
-------- ------- -------------------------
shop     0.1.0   C:\pyguides\shop
tabulate 0.10.0
Command Prompt output of uv pip install humanize, uv pip list, then uv sync uninstalling humanize because it is not in the lockfile
uv sync removed humanize, because it wasn’t in uv.lock.

That’s the trap: in a uv project, anything you add with uv pip install disappears on the next uv sync or uv run, since uv makes the environment match the lockfile exactly.

Remove a dependency with uv remove

The opposite of uv add is uv remove. It takes the package out of all three places:

uv remove tabulate
findstr /n "dependencies tabulate" pyproject.toml

Output:

Resolved 1 package in 2ms
   Building shop @ file:///C:/pyguides/shop
      Built shop @ file:///C:/pyguides/shop
Prepared 1 package in 16ms
Uninstalled 2 packages in 4ms
Installed 1 package in 11ms
 ~ shop==0.1.0 (from file:///C:/pyguides/shop)
 - tabulate==0.10.0
7:dependencies = []
Command Prompt output of uv remove tabulate uninstalling it and leaving an empty dependencies list in pyproject.toml
tabulate is uninstalled and the dependencies list is empty again.

When uv pip install is the right choice

The pip interface is perfect for projects that don’t use a pyproject.toml, like an existing app with a requirements.txt. Create a venv with uv and install from the file:

uv venv --python 3.13
uv pip install -r requirements.txt
uv pip freeze

Output:

Using CPython 3.13.16
Creating virtual environment at: .venv
Activate with: .venv\Scripts\activate
Resolved 6 packages in 8ms
Installed 6 packages in 36ms
 + certifi==2026.7.22
 + charset-normalizer==3.5.2
 + idna==3.20
 + requests==2.32.5
 + tabulate==0.10.0
 + urllib3==2.8.0
certifi==2026.7.22
charset-normalizer==3.5.2
idna==3.20
requests==2.32.5
tabulate==0.10.0
urllib3==2.8.0
Command Prompt output of uv venv and uv pip install -r requirements.txt installing pinned packages, then uv pip freeze
A requirements-file workflow, just much faster than plain pip.

It’s a drop-in speedup for pip install -r requirements.txt, with the same files and habits.

uv add vs uv pip install at a glance

uv adduv pip install
Updates pyproject.tomlYesNo
Updates uv.lockYesNo
Installs into .venvYesYes
Survives uv syncYesNo (removed in a project)
Best foruv projectsrequirements.txt and one-off installs

Rule of thumb: in a uv project, always use uv add. Use uv pip only outside projects. For pip’s own cache flags, see pip install –no-cache-dir.

Here are more guides on Python environments:

Frequently asked questions

What’s the difference between uv add and uv pip install?

uv add records the dependency in pyproject.toml and uv.lock and installs it. uv pip install only installs into the environment.

Why did uv sync remove my package?

It was installed with uv pip install, so it isn’t in uv.lock. uv sync makes the environment match the lockfile exactly.

Should I use uv add or uv pip install?

Use uv add in uv projects. Use uv pip install for requirements.txt workflows and quick experiments.

How do I add a dev dependency with uv?

Run uv add --dev pytest, which puts it in a dev dependency group.

How do I remove a package added with uv add?

Run uv remove package-name.

Where are uv dependencies documented?

See Managing dependencies in the uv docs.