Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Tool · OtherFree

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.

GitHub stars

90.2k (astral-sh/uv)

GitHub · Sept 2026

Licence

Apache 2.0 or MIT

GitHub · Sept 2026

Cost

Free

Astral · Sept 2026

Format

Tool

Topic

Other

Provider

Astral

Time needed

An afternoon to learn, then reference

Level

Beginner

Access

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 init creates a project with a pyproject.toml, and --package gives you a src layout.
  • uv add and uv remove change dependencies and update the lockfile; --dev marks tools such as pytest.
  • uv sync installs exactly what the lockfile says; --frozen fails instead of changing it, which is what you want in CI.
  • uv run runs a command inside the project environment without activating anything.
  • uv python install and uv python pin manage Python versions.
  • uvx runs 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.

pythondevopsopen source

Ready to start?

Opens on Astral in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "uv Documentation". Only Tauseef reads this.

Work with me

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.