← Courses

Python for AI — Beginner Foundations

Data Science

Tools · Lesson 63 of 76

Using uv

The commands you'll use most with uv:

uv init my_project     # start a new project
uv add pandas          # install a package and record it
uv remove pandas       # uninstall it
uv run main.py         # run your program in the project's environment
uv sync                # recreate the environment from the lock file

The big idea: you never manually activate an environment or call pipuv run and uv add handle the environment for you behind the scenes. uv sync is how a teammate (or future you) rebuilds the exact same setup from the project files.

You’re reading for free. Sign in to keep your progress and earn a certificate when you finish.Sign in to keep my progress →