Skip to content

How do uv tool and pipx compare?

uv

pipx and uv tool (with its uvx alias) solve the same problem: install Python command-line tools into per-tool virtual environments and put the entry points on PATH. They diverge on speed, cache lifetime, Python version handling, and a small set of features that exist in only one tool.

What each tool covers

pipx narrows its scope to installing and running Python CLI applications. Anything else (project venvs, Python version management) belongs to other tools.

uv tool is one subcommand of uv, which also handles Python version installs, project dependencies, PEP 723 scripts, and publishing. If uv is already installed for project work, uv tool is already on the machine.

Speed in practice

uv tool install ruff finishes in roughly the time a hot uvx ruff invocation takes. pipx with its default pip backend takes several seconds for the same install because it shells out to pip and virtualenv. The gap grows on cold caches and on tools with heavy dependency trees.

pipx install pipx[uv] opts pipx into uv as the venv-creation backend without changing the pipx CLI. The “Use uv as pipx’s backend” section covers the trade-off.

Cache and version handling

  • Cache lifetime. uvx reuses cached environments indefinitely. Three things invalidate the cache: uv cache clean (or uv cache prune), pinning a new version like uvx black@latest, and passing --refresh. pipx run caches the temp venv too, but it expires after 14 idle days.
  • Persistent install precedence. After uv tool install ruff, plain uvx ruff reuses that persistent environment instead of building an ephemeral one. pipx run ruff always uses the run-cache, even if pipx install ruff already exists.
  • .python-version handling. uv tool install and uvx ignore project-local .python-version files, even though uv run honors them. pipx never reads .python-version either. Pin a tool to a specific Python with --python (both tools) or UV_PYTHON / PIPX_DEFAULT_PYTHON.
  • Bulk Python upgrades. uv python upgrade only bumps patch versions. To move every uv-installed tool from 3.12 to 3.13, run uv tool upgrade --all -p 3.13. The pipx equivalent is pipx reinstall-all --python python3.13.

What pipx still does that uv tool doesn’t

  • pipx inject / pipx uninject modify a tool’s venv in place to add or remove a package. uv tool install --with exists, but using --with again later rebuilds the env from scratch.
  • pipx install --suffix=... keeps two copies of the same tool side by side (for example, two ruff versions). Marked experimental in pipx 1.7, but stable enough that the official comparison table lists it. No uv equivalent.
  • pipx install --global and the PIPX_GLOBAL_* variables drive a system-wide install for multi-user machines. uv tool has no system-wide mode.
  • pipx install-all <spec.json> rebuilds every venv from a pipx list --json snapshot. Useful for migrating tools across machines or Python versions.
  • --include-deps exposes entry points from transitive dependencies, not just the top-level package.
  • Man pages are symlinked under $PIPX_MAN_DIR. uv tool does not install man pages.

What uv tool does that pipx doesn’t

  • uv tool list --outdated queries newer versions without upgrading. --show-with, --show-paths, and similar flags customize the listing.
  • uvx --with-editable PATH adds an editable install for a one-off run, useful when iterating on a plugin.
  • Reproducibility controls. --exclude-newer, --torch-backend, and --isolated work on uv tool and uvx invocations.
  • Shared content-addressed cache. uv pip, uv tool, uv run, and uv venv all draw from the same cache, so packages downloaded for one workflow are reused by the others.
  • Built-in Python version management. uvx --python 3.13 downloads CPython 3.13 if it is not present. pipx uses whichever Python is already on the system.

Use uv as pipx’s backend

pipx install pipx[uv] keeps every pipx command intact but switches the venv-creation step to uv. Existing scripts and CI that call pipx install keep working; cold installs get faster. This is the bridge for a team with pipx wired into onboarding that isn’t ready to retrain on uv tool, or for a workflow that needs pipx inject or --suffix and runs the rest through pipx.

Which one to pick

For a new setup, install uv and use uv tool and uvx. One binary covers Python installs, project work, scripts, and CLI tools, and the install speed is consistently faster.

Stay on pipx when a workflow depends on inject / uninject, --suffix, --global, install-all, or man-page integration. Add pipx[uv] if cold install speed has become a complaint.

Don’t run both side by side without thinking about it. They share ~/.local/bin by default and both refuse to overwrite a binary without --force, so a tool installed by one cannot be re-installed by the other.

Learn more

Last updated on