uv Documentation
The official docs for uv, the fast Python package and project manager from Astral. It replaces pip, virtualenv, pip-tools and pyenv for most projects, and its lockfile is what makes an ML project install the same way on your laptop, in CI and in a Docker image. Free, open source and quick to learn.
90.2k (astral-sh/uv)
GitHub · Sept 2026
Apache 2.0 or MIT
GitHub · Sept 2026
Free
Astral · Sept 2026
Tool
Other
Astral
An afternoon to learn, then reference
Beginner
Free
What uv is
uv is a Python package and project manager written in Rust by Astral, the company behind the Ruff linter. One tool covers jobs that used to need several: creating virtual environments, installing packages, resolving and locking dependencies, installing Python versions, running scripts and running command-line tools. Astral describes it as 10 to 100 times faster than pip, and in daily use the speed is the first thing people notice: environments that took minutes to build appear in seconds.
Why it matters for ML and MLOps work
Machine learning projects break in a very specific way: a model trained with one version of a library loads differently, or not at all, with another. uv's answer is the lockfile. You declare dependencies in pyproject.toml, and uv lock writes uv.lock, which records the exact version of every package, including indirect ones. Commit both files, and uv sync recreates the same environment on a teammate's laptop, in GitHub Actions and inside a Docker image. The docs include a dedicated guide to using uv in Docker and in CI, which is exactly what the MLOps roadmap asks you to build.
The commands you will use most
uv initcreates a project with apyproject.toml, and--packagegives you a src layout.uv addanduv removechange dependencies and update the lockfile;--devmarks tools such as pytest.uv syncinstalls exactly what the lockfile says;--frozenfails instead of changing it, which is what you want in CI.uv runruns a command inside the project environment without activating anything.uv python installanduv python pinmanage Python versions.uvxruns a command-line tool from a package without installing it globally.
How long it takes
If you already know pip and virtual environments, the Getting started and Projects sections take an afternoon. The concepts pages on resolution, caching and workspaces are worth reading once your project grows.
Free or paid?
uv is free and open source under the Apache 2.0 or MIT licence. There is nothing to pay for. In March 2026 OpenAI announced an agreement to acquire Astral, and both companies said the tools would stay open source.
Common questions
Do I still need pip? Not for projects managed by uv. uv pip exists as a drop-in interface if you need pip-style commands.
Does it work with conda? uv manages PyPI packages. If your project depends on conda-only packages, you may still need conda for those.
What can I do after reading it? Turn a notebook folder into a locked, reproducible Python project that installs identically everywhere, and wire it into CI and a Dockerfile.
Best for: anyone moving Python code from notebooks into a real project, and every ML engineer who has lost a day to a broken environment.
Ready to start?
Opens on Astral in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.