Skip to content

2.3. uv

When building projects or apps, we want to use seperate environments for any libraries used.

This means that each project only has the libraries required, which makes deployment easier and prevents issues with different projects requiring different library versions.

uv

uv is another open source tool for installing and managing python virtual environments and libraries.

Relatively new, very fast, and replaces a number of different tools: pip, venv pyenv.

Installing uv

Documentation found here (look familiar?):

Use irm to download the script and execute it with iex:

PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Changing the execution policy allows running a script from the internet.

Request a specific version by including it in the URL:

PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.8.8/install.ps1 | iex"

Use curl to download the script and execute it with sh:

$ curl -LsSf https://astral.sh/uv/install.sh | sh

If your system doesn't have curl, you can use wget:

$ wget -qO- https://astral.sh/uv/install.sh | sh

Request a specific version by including it in the URL:

$ curl -LsSf https://astral.sh/uv/0.8.8/install.sh | sh

Installing python with uv