uv is an incredibly fast Python package installer and resolver written in Rust, currently the fastest among others like Pip and Pipx. It's backed by Astral, the creators of Ruff, and so far, it's my default choice for installing or managing any new package in Python.

The project page highlights that it's 10-100x faster and a drop-in replacement for common pip, pip-tools, and virtualenv commands. It's already being tested and working great with 10,000 PyPI projects.

So, I would suggest you read the entire article to learn how to install uv on Windows, Linux, and macOS with command-line examples.

How to Install uv on Linux, Windows, and macOS

The uv is a cross-platform tool that can be installed on Linux, Windows, and macOS via the Pip and Pipx commands, but I recommend installing it using the installation script provided by the official site.

Run the following command to install it on macOS and Linux via the installation script:

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

Run the following command to install it on Windows via a PowerShell script:

  • irm https://astral.sh/uv/install.ps1 | iex

Alternatively, if you still prefer to install it via Pip or Pipx, then run:

  • pip install uv
  • OR
  • pipx install uv

Usage of uv command

Once the uv is installed on your system, you can execute the following command to display the help section:

  • uv

Output:

uv help section

As you can see in the above picture, uv is not only a package manager but also an extension of existing commands such as pip and venv.

For example, to create a virtual environment using venv, you can prefix it with uv.

  • uv venv

To activate the virtual environment, either execute one of the following commands:

  • On Linux and macOS
  • source .venv/bin/activate
  • On Windows
  • .\.venv\Scripts\activate.ps1

Output:

creating and activating virtual environment with uv

To install a package into your virtual environment, you can execute any one of the following based on the requirement:

  • Installing a single package.
  • uv pip install flask
  • Installing multiple packages from a requirements.txt file.
  • uv pip install -r requirements.txt
  • Installing the current project in editable mode.
  • uv pip install -e .
  • Installing the current project from the disk
  • uv pip install "package @ ."

You can further dig deeper and note that certain Pip features, such as .egg dependencies, editable installs for Git, and direct URL dependencies, are not supported.

If you encounter any issues, then raise a new request on the project issues page. Also, I suggest checking out the release page to get informed on the latest uv release, which often introduces new features, bug fixes, and more.