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:
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 runto 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:
$ pipx install black
Run a tool once without a permanent install:
$ pipx run pycowsay "Hello, World!"
Choose the interpreter for an app:
$ pipx install --python 3.14 nox
Install from a VCS URL or from a local project directory:
$ pipx install "git+https://github.com/psf/black"
$ pipx install .
Upgrade or remove tools and inspect what is installed:
$ pipx upgrade --all
$ pipx uninstall black
$ pipx list
Add an extra helper inside an apps environment:
$ pipx inject black mypy
Related Resources
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.
For additional information on related topics, take a look at the following resources:
By Leodanis Pozo Ramos • Updated Dec. 1, 2025