pipx
Install and Run Python Applications in Isolated Environments
A command-line tool maintained by the Python Packaging Authority that installs Python applications in isolated environments so they never conflict with each other, making every tool available system-wide without using sudo.
pipx is a command-line tool for installing Python applications so that each one runs in its own isolated environment. It works similarly to how macOS's brew handles application management: you install a program once, it becomes available from your terminal anywhere on your system, and it does not interfere with other Python software you have installed.
The core problem pipx solves is dependency conflicts. When you install multiple Python tools using pip directly, their underlying libraries can clash if different tools require different versions of the same package. pipx avoids this by giving each application its own private environment behind the scenes. You never need to manage that environment directly; you just install and use the tool as normal.
Installation depends on your operating system. On macOS you use Homebrew with a single command. On Linux you install via pip with a user-level flag. On Windows you can use Scoop. After installing, running pipx ensurepath ensures your terminal can find the applications pipx manages. The workflow is then straightforward: pipx install pycowsay installs an application globally, and pipx run pycowsay lets you try a tool temporarily without a permanent installation, downloading and running it in a short-lived environment that disappears afterward.
pipx also gives you clear visibility into what is on your machine. You can list all applications it manages, upgrade them one at a time or all at once, and uninstall them cleanly without leaving stray files behind. It never requires elevated permissions, so everything runs as a regular user without using sudo or similar commands.
The project is maintained by the Python Packaging Authority, the same group responsible for pip and other core Python packaging infrastructure. It is open source and welcomes community contributions.
Where it fits
- Install Python CLI tools like black, poetry, or httpie without risking dependency conflicts with other tools or your project code
- Try out a Python command-line tool temporarily with pipx run without permanently installing it, the environment disappears afterward