uv
An extremely fast Python package and project manager written in Rust.
uv
is a package and project manager for Python, written in Rust. It is designed to be extremely fast and efficient, with a focus on performance and ease of use. It is a drop-in replacement for pip
and venv
, and can be used to manage Python packages and projects in a similar way.
Using uv
on the HPC#
To get started with uv
on the HPC, follow the setup instructions below to load the necessary modules and prepare your environment.
First, before using uv
, clear any existing environments:
Or as a single command to set up your environment:
Creating and Activating a Virtual Environment#
You can use uv
to create a virtual environment just like with venv
:
To deactivate your environment:
Using Python with uv
#
Once your environment is activated, you can install packages using uv
’s pip interface:
Specifying Python Versions with uv
#
You can create virtual environments with specific Python versions using the --python
flag.
If a specific Python version is not specified, uv
will use the default Python version available in the environment:
To specify a Python version, you can use the --python
option. For example, to create a virtual environment with Python 3.13:
Note
While uv
can be used with beta versions of Python, this is not recommended, as many community-contributed modules may not function correctly until an official Python release is available.