Skip to content
Published On:
Oct 20, 2025
Last Updated:
Oct 20, 2025

uv is a popular tool from Astral for managing Python environments and dependencies.

Basic Usage

To create a new uv based project in your current working directory, run the following command:

Terminal window
uv init

Add Dependencies From PyPI

To add a dependency from PyPI (Python Package Index), you can use the following command:

Terminal window
uv add <package-name>

Adding Existing dependencies.txt File

If you have an existing project that uses a dependencies.txt file, you can add all the dependencies into your uv project with:

Terminal window
uv add -r requirements.txt

This will add all the dependencies into the pyproject.toml file.