Skip to content

pipx

pipx is a command-line tool that installs and runs end-user Python applications in isolated virtual environments and exposes their console scripts on your PATH. It targets packages that expose console scripts rather than libraries that other code imports.

Installation and Setup

Current pipx releases need Python 3.11 or newer, both to run pipx and for any interpreter you pass with --python. Install it from PyPI and add it to PATH:

Language: Windows PowerShell
PS> py -m pip install --user pipx
PS> py -m pipx ensurepath
PS> pipx --version
Language: Shell
$ python3 -m pip install --user pipx
$ python3 -m pipx ensurepath
$ pipx --version

The official install guide uses brew install pipx on macOS and scoop install pipx on Windows. On distributions that adopt PEP 668, such as Ubuntu 23.04+, Debian 12+, and Fedora 38+, the system Python is externally managed and installing pipx with pip fails with externally-managed-environment. Those systems install the distribution package with sudo apt install pipx or sudo dnf install pipx.

Restart your shell so the PATH changes take effect.

Key Features

  • Per-app isolation by creating one environment for each installed tool to avoid dependency conflicts.
  • One-off execution with pipx run to try a tool without installing it permanently, including local, URL-hosted, or VCS-hosted .py scripts that declare their own dependencies in a PEP 723 # /// script block.
  • Flexible installation from PyPI, local paths, or version control systems (VCS), including extras and exact versions.
  • Environment management commands to list, upgrade, reinstall, pin, and uninstall apps, plus inject to add extra packages to an app’s environment.
  • Control over the interpreter used for an app with --python, which helps test tools across Python versions, plus --fetch-python=missing|always to download a standalone build when no local interpreter fits.
  • Pluggable backend that builds environments with uv instead of pip and venv while the CLI surface stays the same. New environments default to uv when uv 0.9.17 or newer is available, either bundled through pipx install pipx[uv] or on your PATH. You can pick a backend explicitly with --backend or PIPX_DEFAULT_BACKEND.

Usage

Install a command-line tool and expose its entry points:

Language: Shell
$ pipx install black

Run a tool once without a permanent install:

Language: Shell
$ pipx run pycowsay "Hello, World!"

Choose the interpreter for an app:

Language: Shell
$ pipx install --python 3.14 nox

Install from a VCS URL or from a local project directory:

Language: Shell
$ pipx install "git+https://github.com/psf/black"
$ pipx install .

Upgrade or remove tools and inspect what is installed:

Language: Shell
$ pipx upgrade --all
$ pipx uninstall black
$ pipx list

Add an extra helper inside an app’s environment:

Language: Shell
$ pipx inject black mypy
Install and Execute Python Applications Using pipx

Tutorial

Install and Execute Python Applications Using pipx

In this tutorial, you'll learn about a tool called pipx, which lets you conveniently install and run Python packages as standalone command-line applications in isolated environments. In a way, pipx turns the Python Package Index (PyPI) into an app marketplace for Python programmers.

intermediate tools

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Leodanis Pozo Ramos • Updated Nov. 12, 2026