pipx(1)
pipx installs and runs Python applications in isolated virtual environments.
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
| Flag | What it does |
|---|---|
install | Install a Python application into its own virtual environment |
upgrade | Upgrade an installed application to the latest version |
uninstall | Remove an installed application and its virtual environment |
list | List all installed applications and their versions |
run | Run a Python application without installing it permanently |
--include-deps | Include executable scripts from package dependencies |
--python | Specify which Python interpreter to use (e.g., --python python3.11) |
--index-url | Use a custom PyPI index URL for package downloads |
--force | Force reinstall even if package is already installed |
inject | Add packages to an existing application's virtual environment |
Examples
Install the Black code formatter in its own isolated environment
pipx install blackShow all installed applications with their versions and paths
pipx listRun 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-allInstall Poetry using a specific Python version (3.11)
pipx install poetry --python python3.11Add pytest-cov plugin to an already-installed pytest application
pipx inject pytest pytest-covRemove Black and clean up its virtual environment
pipx uninstall blackInstall a package from a custom PyPI-compatible index
pipx install --index-url https://test.pypi.org/simple/ mypackage