Stage 1 · Lesson 4 of 8
Dependencies and lockfiles with uv
A records the exact version of every package your project uses, including the packages your packages depend on. uv, a fast and project manager from Astral, creates a virtual environment (an isolated set of packages for one project), resolves dependencies from pyproject.toml and writes uv.lock.
Commit both files. Anyone, including CI and your build, then recreates the same environment with uv sync, and uv run runs commands inside it. This matters more in ML than elsewhere: a model saved with one version of a library may load differently, or not at all, with another.
Common trapinstalling packages by hand on a server with pip install, so production runs versions nobody wrote down.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CoursePaidGrokking Python Fundamentals
Design Gurus · Beginner · $50
If your Python stops at notebooks: modules, functions, classes and error handling done properly
- CourseFreeMade With ML
Goku Mohandas · Advanced
Free: the scripting, CLI, testing and documentation lessons turn notebook code into a real project