pipx (Python Package Installer for Executables) is a tool to install and run Python applications in isolated environments. It ensures that executable applications installed via pip do not interfere with your system's global Python environment or other projects. It's currently at version 1.11.1 and follows an active, irregular release cadence, often aligning with important bug fixes or Python version support changes. pipx is primarily a command-line interface tool.
pip install pipxNo compatibility data collected yet for this library.
This quickstart demonstrates the core workflow of pipx: installing pipx itself, then using it to install a sample CLI application (cowsay), running it, listing installed applications, and finally uninstalling it. All interactions are done by calling pipx as a command-line tool via subprocess, reflecting its primary mode of use.
Ensure your system's Python is 3.9 or newer before installing/upgrading pipx.
Execute `pipx ensurepath` after installation and restart your terminal or shell.
Understand that pipx applications live in their own venvs. Use `pipx list` to see them and `pipx run <app>` to execute, or `pipx ensurepath` for direct execution.
Choose `pipx install` for persistent applications and `pipx run` for ephemeral, single-use executions.
After installing `pipx`, run `pipx ensurepath` to add the necessary directory to your PATH. You will likely need to restart your terminal or shell session for the changes to take effect. For Unix/macOS: `pipx ensurepath` For Windows PowerShell: `pipx ensurepath` (then restart PowerShell) Alternatively, if you installed via a system package manager (e.g., `brew install pipx` on macOS, `sudo apt install pipx` on Ubuntu), ensure the package manager's bin directory is in your PATH.
When installing applications, use your distribution's package manager if `pipx` is available (e.g., `sudo apt install pipx`, `sudo dnf install pipx`, `brew install pipx`). If installing `pipx` itself, avoid `pip install --user pipx` and use the system package manager or install `pipx` into its own virtual environment. When using `pipx` to install Python applications, it inherently handles virtual environments for isolation, so this error usually points to an issue with `pipx`'s own installation or a misunderstanding of `pip` vs `pipx` usage.
First, check the detailed error log mentioned in the output. Common fixes include: 1. Reinstalling all `pipx`-managed packages: `pipx reinstall-all` 2. If the issue is related to a Python upgrade, consider removing and reinstalling `pipx` and its shared environment. On Unix/macOS: `rm -rf ~/.local/pipx` then `python3 -m pip install --user pipx && python3 -m pipx ensurepath`. 3. Ensure you have necessary system build tools (e.g., `build-essential` on Debian/Ubuntu, `Xcode Command Line Tools` on macOS). 4. Check for and unset any problematic `PIP_*` environment variables using `env | grep '^PIP_'` (Unix/macOS) or `set PIP_` (Windows cmd).
If the package is truly a library to be imported in your Python code, you should install it with `pip` within a virtual environment (e.g., `python -m venv .venv && source .venv/bin/activate && pip install my-library`). If it is an application and you expect it to have executables but they are from its dependencies, try `pipx install <package-name> --include-deps`. If you are the package author, ensure your `setup.py` or `pyproject.toml` correctly defines `console_scripts` entry points.
No dependency data recorded yet.