$linuxjunkies
>

pipx(1)

pipx installs and runs Python applications in isolated virtual environments.

UbuntuDebianFedoraArch

Synopsis

pipx [COMMAND] [OPTIONS] [ARGS]

Description

pipx is a tool for installing and running Python applications in isolated environments without affecting your system Python or other packages. Each application gets its own virtual environment, preventing dependency conflicts.

Unlike pip, which installs packages globally or in a single environment, pipx creates separate venvs for each tool, making it ideal for command-line utilities and applications. Installed tools remain on your PATH and work like native system commands.

Common options

FlagWhat it does
installInstall a Python application into its own virtual environment
upgradeUpgrade an installed application to the latest version
uninstallRemove an installed application and its virtual environment
listList all installed applications and their versions
runRun a Python application without installing it permanently
--include-depsInclude executable scripts from package dependencies
--pythonSpecify which Python interpreter to use (e.g., --python python3.11)
--index-urlUse a custom PyPI index URL for package downloads
--forceForce reinstall even if package is already installed
injectAdd packages to an existing application's virtual environment

Examples

Install the Black code formatter in its own isolated environment

pipx install black

Show all installed applications with their versions and paths

pipx list

Run cowsay without installing it permanently; downloads and runs in temporary venv

pipx run cowsay 'Hello from pipx'

Update all installed applications to their latest versions

pipx upgrade-all

Install Poetry using a specific Python version (3.11)

pipx install poetry --python python3.11

Add pytest-cov plugin to an already-installed pytest application

pipx inject pytest pytest-cov

Remove Black and clean up its virtual environment

pipx uninstall black

Install a package from a custom PyPI-compatible index

pipx install --index-url https://test.pypi.org/simple/ mypackage

Related commands