Skip to main content

How to Install DVC with uv

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

DVC (Data Version Control) is a Python package, so uv can install it in two ways: into one project, with its version pinned in the project's uv.lock, or once for your user account, as a dvc command that works in every folder. This guide does both with DVC 3.67.1 and uv 0.13.10, and says which one to pick.

Syntax​

Syntax
uv add --dev dvc
uv tool install dvc
PartWhat it means
uv add --dev dvcAdds DVC to the project's dev dependency group in pyproject.toml, pins the exact version in uv.lock, and installs it into the project's .venv folder
uv tool install dvcInstalls DVC into an environment of its own and puts a dvc command on your PATH, for every folder

uv's dependencies documentation explains the dev group: "development dependencies are local-only and will not be included in the project requirements when published to PyPI or other indexes." Its tools guide explains the second form: "When a tool is installed, its executables are placed in a bin directory in the PATH which allows the tool to be run without uv."

The Example​

sales-report is a small uv project, created with uv init --python 3.15 sales-report. Its code doesn't import DVC: DVC is a command you run while you work on the project, to version its data files. That's why it goes into the dev group rather than the dependencies the code needs to run.

Prerequisites​

  • uv. Run uv --version to check; this guide uses uv 0.13.10.

Step 1: Check Whether DVC Is Installed​

In the project folder:

Terminal
dvc --version
Output
zsh: command not found: dvc

There's no dvc command yet.

Step 2: Add DVC to the Project​

Terminal
uv add --dev dvc
Output (first and last lines)
Using CPython 3.15.2 interpreter at: /Library/Frameworks/Python.framework/Versions/3.15/bin/python3.15
Creating virtual environment at: .venv
Resolved 99 packages in 2.68s
Built antlr4-python3-runtime==4.9.3
Built sales-report @ file:///Users/you/source/sales-report
Prepared 97 packages in 1.38s
Installed 97 packages in 91ms
+ aiohappyeyeballs==2.7.1
+ aiohttp==3.14.5
...
+ wcwidth==0.9.6
+ yarl==1.25.1
+ zc-lockfile==4.1

The terminal after uv add --dev dvc: uv created the project's .venv, resolved 99 packages and installed 97, from aiohappyeyeballs 2.7.1 to zc-lockfile 4.1.

uv created the project's .venv folder and installed 97 packages into it: DVC 3.67.1, the libraries DVC uses, and the project itself. The full list includes the line + dvc==3.67.1. uv also wrote DVC into pyproject.toml:

pyproject.toml (the end)
[dependency-groups]
dev = [
"dvc>=3.67.1",
]

The end of pyproject.toml in a macOS-style code window: a dependency-groups table whose dev group lists dvc>=3.67.1.

dvc>=3.67.1 allows newer versions, but uv.lock records the exact one, 3.67.1, so everyone who runs uv sync in this project gets the same DVC.

Step 3: Run DVC from the Project​

Terminal
uv run dvc --version
Output
3.67.1

uv run runs a command from the project's .venv. On its own, dvc still isn't found, because DVC lives inside the project:

Terminal
dvc --version
Output
zsh: command not found: dvc

The terminal after uv run dvc --version, which prints 3.67.1, and plain dvc --version, which still says command not found.

The commands are the same in PowerShell.

Step 4: Or Install DVC Once for Your User​

To have a dvc command in every folder instead, install it as a uv tool:

Terminal
uv tool install dvc
Output (first and last lines)
Resolved 96 packages in 1.09s
Prepared 13 packages in 1.36s
Installed 96 packages in 105ms
+ aiohappyeyeballs==2.7.1
+ aiohttp==3.14.5
...
+ yarl==1.25.1
+ zc-lockfile==4.1
Installed 1 executable: dvc

Only 13 packages had to be prepared, because uv's cache already held the rest from Step 2. Now the plain command works, and uv tool list shows what uv installed:

Terminal
dvc --version
Output
3.67.1
Terminal
uv tool list
Output
dvc v3.67.1
- dvc

The terminal after uv tool install dvc, which ends with Installed 1 executable: dvc, then dvc --version printing 3.67.1 and uv tool list showing dvc v3.67.1.

Which One to Use​

uv add --dev dvcuv tool install dvc
Where it worksIn that project, as uv run dvcIn every folder, as dvc
VersionPinned in the project's uv.lockWhatever you installed last
Everyone on the team gets itYes, with uv syncNo, each person installs it

For a project other people clone, or one that runs in CI, use uv add --dev dvc: the DVC version is part of the project, like every other package. Use uv tool install dvc for your own quick work across many folders.

DVC's installation guide for macOS also lists Homebrew, pip and conda, and extras for cloud storage such as dvc[s3]. Storage on your own disk needs no extra.

Common Mistakes​

MistakeWhat happensDo this instead
Running dvc after uv add --dev dvczsh: command not found: dvcRun uv run dvc, or install it as a tool as well
Expecting the tool to use the project's Pythonuv tool install ignores the project's .python-versionPass --python 3.15 to uv tool install if the version matters

Troubleshooting​

SymptomLikely causeFix
command not found: dvcDVC is only in a project's .venv, or not installeduv run dvc in the project, or uv tool install dvc
error: Failed to spawn: dvc from uv run dvcYou ran it outside the project folder, so uv didn't find the project's .venvMove into the project folder first

FAQ​

Which Python does the tool use?​

uv's tools documentation says a tool environment "will ignore non-global Python version requests like .python-version files and the requires-python value from a pyproject.toml." On this Mac, uv tool install dvc picked uv's own Python 3.14.10, while the project uses 3.15.2. DVC 3.67.1 runs on both.

How do I upgrade DVC later?​

For the tool, uv tool upgrade dvc. In the project, uv lock --upgrade-package dvc, then uv sync. Today both find nothing newer:

Output
Nothing to upgrade
Resolved 99 packages in 539ms

What if uv says the bin folder isn't on my PATH?​

The tools guide says: "If it's not on the PATH, a warning will be displayed and uv tool update-shell can be used to add it to the PATH."

Conclusion​

uv add --dev dvc installed DVC 3.67.1 into the project and pinned it in uv.lock, so it runs as uv run dvc. uv tool install dvc gave a dvc command for every folder. For a shared project, the pinned version is the one to use.

Additional Resources​