uv tool install
Install commands provided by a Python package into an isolated environment.Usage
Description
Packages are installed into an isolated virtual environment in the uv tools directory. The executables are linked to the tool executable directory, which is determined according to the XDG standard and can be retrieved withuv tool dir --bin.
If the tool was previously installed, the existing tool will generally be replaced.
After installing a tool, you may need to add the tool executable directory to your
PATH. Use uv tool update-shell to do this automatically.Examples
Install a tool
Install a specific version
Install with version constraint
Install with extras
Install with additional dependencies
Install from Git
Install in editable mode
Force reinstall
Arguments
The package to install commands from. Can be a package name, a package with version specifier, a URL, or a local path.
Options
Package Options
The package to install commands from. This option is provided for parity with
uv tool run, but is redundant with the PACKAGE argument.Include additional requirements. Can be specified multiple times.
Run with the packages listed in the given files. Supports
requirements.txt, .py files with inline metadata, and pylock.toml.Install the target package in editable mode, such that changes in the package’s source directory are reflected without reinstallation.
Include the given packages in editable mode. Can be specified multiple times.
Install executables from the specified packages. This allows you to install commands from additional packages beyond the main package.
Constraints
Constrain versions using the given requirements files. Constraints files only control the version of a requirement but don’t trigger installation.
Override versions using the given requirements files. Overrides force a specific version regardless of other requirements.
Exclude packages from resolution using the given requirements files. Excludes are unconditional - any package listed will be omitted from all resolved environments.
Constrain build dependencies using the given requirements files when building source distributions.
Installation Options
Force installation of the tool. Will replace any existing entry points with the same name in the executable directory.
Python Options
The Python interpreter to use to build the tool environment.See
uv help python for details on Python discovery and supported request formats.The platform for which requirements should be installed. Represented as a “target triple” (e.g.,
x86_64-unknown-linux-gnu or aarch64-apple-darwin).PyTorch Options
The backend to use when fetching packages in the PyTorch ecosystem (e.g.,
cpu, cu126, or auto).This option is in preview and may change in future releases.
Git Options
Whether to use Git LFS when adding a dependency from Git.
Version and Extras Specification
Specifying versions
You can specify package versions using standard Python version specifiers:Installing with extras
Install packages with optional extras:Installing from alternative sources
Tool Environment Location
Tools are installed in the uv data directory:- Unix:
$XDG_DATA_HOME/uv/toolsor$HOME/.local/share/uv/tools - Windows:
%APPDATA%\uv\data\tools
UV_TOOL_DIR environment variable.
Finding the tool directory
Troubleshooting
Command not found after installation
Ensure the tool executable directory is on yourPATH:
Installation fails due to conflicts
Use--force to replace existing installations:
Python version incompatibility
Specify a compatible Python version:Checking installed tool location
Useuv tool list --show-paths to see where tools are installed:
Reinstalling a tool
To completely reinstall a tool:See Also
- uv tool run - Run a tool without installing it
- uv tool list - List installed tools
- uv tool uninstall - Uninstall a tool
- uv tool update-shell - Add tool directory to PATH