Formatters, project generators, and similar tools are terminal applications rather than application dependencies. pipx installs each tool in a dedicated virtual environment and exposes its command on PATH, reducing conflicts between unrelated tools.

Use the application lifecycle

pipx ensurepath
pipx install httpie
pipx list
http --version
pipx upgrade httpie
pipx uninstall httpie

You may need a new terminal after ensurepath. To try a tool once, use pipx run. Always review the package first: dependency isolation does not make untrusted code safe.

Choose the right installer

Use pipx for applications invoked from a shell. Use python -m pip inside a virtual environment for libraries imported by a project, as explained in the pip dependency guide. For project lockfiles and commands, see the uv project manager tutorial.

In CI, declare and pin the tool in the job environment instead of relying on a worker's global state. Reproducibility matters more than local convenience.

The official pipx documentation, accessed July 22, 2026, covers isolated environments, installation, temporary runs, and upgrades. pipx manages user-facing applications; it does not replace project dependency management.

How isolation works

When you run pipx install httpie, pipx creates a dedicated virtual environment, installs the distribution, and exposes the executables declared by that distribution through a directory on PATH. The http command is available from any folder, but HTTPie's dependencies do not enter another application's environment or the project you happen to be editing.

This separation lets two tools depend on incompatible releases of the same library. It also makes removal predictable: pipx uninstall httpie removes that application's environment and its exposed commands without guessing whether another application still needs a shared package.

Isolation is not a security sandbox. A tool launched through pipx runs with your account's permissions, can read accessible files, and may use the network. Verify the package name, publisher, documentation, and repository before installing it.

Install pipx for your operating system

The preferred installation method varies by platform. Linux distributions often package pipx, Homebrew is a documented choice on macOS, and the Windows instructions include options such as Scoop or py -m pip. Follow the current official installation page because distribution commands and packaged versions can change.

After installation, inspect the setup:

pipx --version
pipx environment

pipx ensurepath adds the relevant user directories to PATH. Read the change it reports and start a new terminal so the shell reloads its configuration. If an installed command remains unavailable, pipx environment shows the application, environment, and man-page locations. Compare the application directory with the effective PATH instead of repeatedly reinstalling the package.

pipx uses an available Python interpreter to create each environment. On a machine with several interpreters, select one explicitly:

pipx install --python python3.12 httpie

That interpreter must already exist. The option helps when a tool does not yet support the newest Python release or when a team wants a known runtime for a utility.

Pin versions and inspect state

Without a version constraint, installation selects a compatible release according to pip's resolution rules. Pass a requirement when you need to reproduce a setup or delay an incompatible update:

pipx install "black==24.10.0"
pipx list
pipx upgrade black

The version above demonstrates syntax; it is not a recommendation of the current release. Check the tool's official release history and test changes before updating a shared workflow. pipx list reports environments, installed versions, and exposed commands. If a script needs structured information, inspect the options supported by your installed release with pipx list --help.

pipx upgrade name updates one application. pipx upgrade-all updates every managed application, which is convenient on a personal workstation but increases the scope of a change. For work systems, upgrade deliberately, exercise important commands, and record enough version information to rebuild the setup.

If an operating-system upgrade removes the Python interpreter that created the environments, pipx reinstall-all can recreate applications with a current interpreter. Save the output of pipx list and read the command documentation first. Reinstallation may resolve newer transitive dependencies when they were not pinned.

Run a tool temporarily

pipx run creates or reuses a temporary environment and launches an application without keeping a normal installation. It suits an occasional command or a trial:

pipx run pycowsay "temporary environment"
pipx run --spec "black==24.10.0" black --check .

The distribution name and command name are not always identical. --spec identifies the distribution when you need a particular release or a differently named command. Consult pipx run --help for cache and suffix behavior in your installed version.

A temporary environment still downloads and executes code. Check spellings to avoid packages impersonating well-known projects, obtain commands from official documentation, and do not run an unknown package with administrative privileges. For recurring automation, a declared and pinned installation is generally easier to audit than an implicit download on every run.

Add optional dependencies carefully

Some applications support plugins outside their main distribution. pipx inject adds a package to an application's managed environment:

pipx inject mkdocs mkdocs-material
pipx list
pipx uninject mkdocs mkdocs-material

Use injection when the application's documentation recommends that plugin. The packages now share one environment and can affect dependency resolution, so test an application command after injection or upgrades. This deliberately relaxes some of the separation pipx provides between applications.

Do not use inject to turn a CLI environment into a general project environment. If project code imports requests, pandas, or another library, declare it as a project dependency. A pipx-managed environment is an implementation detail of the CLI and should not supply application imports.

Make team usage reproducible

pipx works well for applications owned by an individual workstation, but it does not by itself provide a project manifest for the entire team. Document required tool names, versions, and purposes in the repository. A setup script may contain explicit installation commands when it is reviewable and reports failures clearly.

Tools that participate in builds, linting, or tests need reproducible releases. You can keep them among project development dependencies and run them inside the project environment, or provision pinned pipx specifications on each workstation. Either approach can work, but local and CI versions should agree so they produce comparable output.

In containers, ephemeral systems, and CI jobs, consider whether another isolation layer provides value. Installing the CLI directly into the disposable job environment is often simpler. Never rely on whichever pipx application happens to exist on a shared runner because that state can change between runs.

Diagnose common failures

When a command fails to launch, separate command discovery, the managed environment, and the tool's own behavior. First confirm installation with pipx list. Then verify that the application directory from pipx environment is on PATH. Finally run the command's version or help option and preserve its original error message.

An installation failure may report a missing compiler, system library, supported Python release, or correct distribution name. pipx delegates package installation to pip inside the environment; it does not supply native libraries required by an extension. Read the package's official requirements before attempting workarounds with elevated permissions.

Avoid manually editing pipx's internal environments. Use upgrade, reinstall, inject, and uninstall so the state reported by pipx remains accurate. Remove unused applications and verify the result with pipx list. That routine preserves the main benefit: globally available commands without one fragile global Python environment.