Skip to content

Image

pipx — Install and Run Python Applications in Isolated Environments

Image

pipx installs and runs end-user Python applications in isolated environments. It fills the same role as macOS's brew, JavaScript's npx, and Linux's apt. Under the hood it uses pip, but unlike pip it creates a separate virtual environment for each application, keeping your system clean.

Documentation

  • Tutorials — install your first application and run commands in temporary environments.
  • How-to Guides — recipes for installing pipx, injecting packages, configuring paths, and more.
  • Reference — CLI flags, examples, environment variables, and programs to try.
  • Explanation — how pipx works under the hood and how it compares to other tools.
flowchart LR
    USER["you"] --> |"pipx install"| PIPX["pipx"]
    USER --> |"pipx run"| PIPX
    PIPX --> |"fetches from"| PYPI["PyPI"]
    PIPX --> |"creates"| VENV["isolated venvs"]
    VENV --> |"exposes on PATH"| APPS["black, ruff,<br/>poetry, ..."]

    style USER fill:#3f72af,color:#fff
    style PIPX fill:#2a9d8f,color:#fff
    style PYPI fill:#c78c20,color:#fff
    style VENV fill:#7c4dff,color:#fff
    style APPS fill:#388e3c,color:#fff

pip vs pipx

pip installs both libraries and applications into your current environment with no isolation. pipx installs only applications, each in its own virtual environment, and exposes their commands on your PATH. You get clean uninstalls and zero dependency conflicts between tools.

Where do apps come from?

pipx pulls packages from PyPI by default, but accepts any source pip supports: local directories, wheels, and git URLs. Any package that declares console script entry points works with pipx. Poetry and hatch users can add entry points the same way.

Features

pipx lets you

  • install CLI apps into isolated environments with pipx install, guaranteeing no dependency conflicts and clean uninstalls;
  • list, upgrade, and uninstall packages in one command; and
  • run the latest version of any app in a temporary environment with pipx run.

pipx runs with regular user permissions and never calls sudo pip install.

Testimonials

"Thanks for improving the workflow that pipsi has covered in the past. Nicely done!"

Jannis Leidel, PSF fellow, former pip and Django core developer, and founder of the Python Packaging Authority (PyPA)

"My setup pieces together pyenv, poetry, and pipx. [...] For the things I need, it's perfect."

Jacob Kaplan-Moss, co-creator of Django in blog post My Python Development Environment, 2020 Edition

"I'm a big fan of pipx. I think pipx is super cool."

Michael Kennedy, co-host of PythonBytes podcast in episode 139

Credits

pipx was inspired by pipsi and npx. It was created by Chad Smith and has had lots of help from contributors. The logo was created by @IrishMorales.

pipx is maintained by a team of volunteers (in alphabetical order)