Skip to content

Install uv to manage and install Python-based command line tools

After setting up your system software (in the previous chapter), you'll likely want to install various Python-based command line tools that you can use anywhere in your system1. Rather than relying on a global Python installation (like Anaconda), we'll use uv2 to install each tool in its own isolated environment. This approach gives us the best of both worlds: tools that are globally available on your system, but each running in its own clean, isolated Python environment.

First, install uv if you haven't already:

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

Verify that uv is installed and available in your PATH:

which uv
# ensure it is something like $HOME/.cargo/bin/uv

Now you can install Python-based tools globally. Each tool will be available anywhere in your system but will run in its own isolated environment. For example, to install llamabot:

uv tool install llamabot

Or run pyds-cli, my opinionated tooling for data scientists, without having to even install it:

uvx --from pyds-cli pyds project init

The uv tool install and uvx commands handle everything for you: creating an isolated Python environment for each tool, installing the tool and its dependencies, and making the tool's commands available in your PATH. This gives you the convenience of global tools without the mess of a global Python installation. Plus, uv's Rust-based implementation means blazingly fast installations and reliable dependency resolution.

Further reading


  1. I define this as the environment when you've either SSH-ed into a remote server or when you open a new terminal locally on your laptop. 

  2. uv is an extremely fast Python package installer and resolver, written in Rust. It handles global tool installation by automatically creating isolated environments for each tool. Learn more about it here