The uv tool is a great option for installing Python and creating virtual environments. It will automatically install Python if it is not available on your system.
The typical Python installation and virtual environment workflow consists of the steps shown below. There are different ways to install Python depending on the operating system and additional steps must be taken if multiple versions of Python are needed.
With uv, the process is similar as before (see steps below). However, installing Python is simplified with uv because it will automatically install the latest version if it does not exist on the system. Uv can also manage different Python versions without additional tools.
Below is a terminal session where uv creates a virtual environment for running a Python script. The --seed
option ensures that pip is available in the environment. Use the --python
option to specify a particular Python version to use for the virtual environment. More information about uv is available on the Astral website at https://astral.sh.
Gavin Wiggins © 2025.
Made on a Mac with Genja. Hosted on GitHub Pages.