Asif Rahman

Installing Local Python Packages with uv tool

How to install local Python packages or built distributions using Astral's uv tool.

Astral’s uv Python package manager has a concept of tools, which are Python packages that provide command-line interfaces. Tools are installed with isolated dependencies. For example, I can install my presskit package as a tool and it will be available system-wide: uv tool install presskit.

During development, I often want to test changes to my package without having to publish it to PyPI. uv tool allows me to install a local package or a built distribution directly, making it easy to test changes. Here are a few ways to do it:

Install from local directory

uv tool install .

Install from built distribution

# First build the package
source .venv/bin/activate && python -m build

# Then install the built wheel
uv tool install dist/presskit-*.whl

Install in editable mode for development

uv tool install --editable .

# Install with specific features
uv tool install --editable ".[dev,docs]"

The --editable flag is particularly useful during development as changes to my source code will be reflected immediately without reinstalling.

Install from git repository

uv tool install git+https://github.com/asifr/presskit.git

#Python