The uv is a Python package installer and resolver that is written in Rust programming language. The uv
is a drop-in replacement for pip
, pip-tools
, and virtualenv
commands. This tutorial demonstrates how to install uv
Python package installer on Ubuntu 24.04.
Install uv
Retrieve the latest uv
version directly from its GitHub repository:
wget -qO uv.tar.gz https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz
Utilize the specified version to download uv
:
sudo tar xf uv.tar.gz --strip-components=1 -C /usr/local/bin uv-x86_64-unknown-linux-gnu/uv
Verify uv
version using command:
uv --version
Delete no longer needed file:
rm -rf uv.tar.gz
Testing uv
Make a project directory and navigate to it:
mkdir myproject && cd myproject
Create a virtual environment:
uv venv
Activate the virtual environment:
source .venv/bin/activate
The uv pip install
command is used for package installations. For example, the pytz package can be installed with the following command:
uv pip install pytz
Uninstall uv
To get rid of uv
, delete the corresponding file:
sudo rm -rf /usr/local/bin/uv
Leave a Comment
Cancel reply