type
status
date
slug
summary
tags
category
icon
password
URL
The Python packaging ecosystem has always been a bit chaotic, but the new tool uv, created by Astral (the team behind Ruff), aims to simplify and speed up the process. Written in Rust, uv is designed to replace tools like pip, venv, and others while offering faster performance. Hereโs how to get started with this promising tool.
Setting Up uv
To install uv, you can simply use pip:
Once installed, you can create a virtual environment with:
If you don't provide a directory, the venv will default to
.venv
. Note that uv-created environments donโt come with pip or setuptools, as uv encourages using its own tools.Installing Packages with uv
You can install packages using uvโs own version of pip, like so:
It supports most standard pip commands, including editable installs or optional components:
For installing directly from GitHub, youโll need a slightly different syntax:
Make sure to include quotes to properly escape the
@
symbol.Managing Dependencies
uv offers useful commands for managing dependencies, such as locking versions and syncing them with your project:
This locks the current versions into a file. To sync dependencies with a locked list, you can use:
And if you want to generate a locked list from
pyproject.toml
, you can use:ย