There are many ways to install Python. The official site, system package managers, Anaconda, pyenv — they all work, but they all leave you wiring tools together yourself.
Instead, we’ll use uv, a modern tool that installs Python, manages versions, creates virtual environments, and installs packages. One tool for the whole job. It’s fast — usually 10 to 100 times faster than the old pip workflow — and it’s quickly becoming the standard in the Python and AI world.
Install uv
macOS and Linux
Open a terminal and run:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
Open PowerShell and run:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Verify uv is installed
Close and reopen your terminal, then run:
uv --version
You should see something like:
uv 0.5.0
The exact version will be different — what matters is that the command runs.
Install Python using uv
With uv installed, getting Python is one command:
uv python install 3.13
This downloads Python 3.13 (or a newer version, depending on what’s current) and stores it in a place uv manages. You don’t need to think about where.
Check that Python is available:
uv run python --version
Python 3.13.0
The uv run part tells uv to run a command using its managed Python. We’ll be using uv run for the rest of the course.
Why not just install Python from python.org?
You can. The installer at python.org works fine, and millions of people use it. The reason we don’t:
- Multiple Python versions get messy. One project needs 3.11, another needs 3.13. Tools like
uvkeep them straight without your help. - Virtual environments are tedious. Without
uv, you have to runpython -m venv .venvthen activate it then remember to install packages inside it.uvdoes it all in one step. pipis slow. On a machine learning project with hundreds of dependencies,pip installcan take minutes.uvdoes it in seconds.
If you already have Python installed from somewhere else, that’s fine — leave it alone. uv will use its own copy.
A note on the python command
Older tutorials say “run python script.py”. On many systems that command doesn’t exist or points to the wrong version. Throughout this course we’ll use:
uv run python script.py
This always runs Python through uv, using whichever version uv has installed. You’ll see the shorter form python in other docs — they mean the same thing once your environment is set up.
What’s next
Python is installed. Next we’ll meet the REPL — Python’s interactive prompt, where you can try ideas one line at a time.