pipx

pipx is a command-line tool that installs and runs Python packages in isolated virtual environments and exposes their console scripts on your PATH.

Installation and Setup

Install it from PyPI and add it to PATH:

Windows PowerShell
PS> py -m pip install pipx
PS> py -m pipx ensurepath
PS> pipx --version
Shell
$ python -m pip install pipx
$ python -m pipx ensurepath
$ pipx --version

Restart you 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.
  • Flexible installation from PyPI, local paths, or version control systems (VCS)s, including extras and exact versions.
  • Environment management commands to list, upgrade, reinstall, and uninstall apps, plus inject to add extra packages to an apps environment.
  • Control over the interpreter used for an app with --python, which helps test tools across Python versions.

Usage

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

Shell
$ pipx install black

Run a tool once without a permanent install:

Shell
$ pipx run pycowsay "Hello, World!"

Choose the interpreter for an app:

Shell
$ pipx install --python 3.14 nox

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

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

Upgrade or remove tools and inspect what is installed:

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

Add an extra helper inside an apps environment:

Shell
$ pipx inject black mypy

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:


By Leodanis Pozo Ramos • Updated Dec. 1, 2025