python3 -m pip install --user pipx
pipx
is a tool to help you install and run end-user applications written in Python.
It’s roughly simialr to macOS’s brew
, JavaScript’s npx
, and Linux’s apt
.
It is closely ralated to pip
. In fact, it uses pip
, but is focused on installing and managing Python packages that can be run from the command line directly as applications.
An end user is the person that a software program or hardware device is designed for.
The end user can be contrasted with the developers or programmers of the product.
pip
?pip
is a general-purpose package installer for both libraries and apps with no environment isolation.
pipx
is made specifically for application installation, as it adds isolation yet still makes the apps available in your shell : pipx
creates an isolated environment for each application and its associated packages.
In a short word:
With
pipx
when you install things they go into isolated environments. Withpip
you’re just installing things gloabally.
This difference is important due to dependencies- if you have two different CLI tools you want to install but they have conflicting dependencies then pip
is going to put at least one of them into an unsuable state, while pipx
will allow them to both coexist on the same system.
pipx
install Apps from?By default, pipx
uses the same packages index as pip
, PyPI. pipx
can also install from all other sources pip can, such as a local directory, wheel, git url, etc.
pipx
is a tool to install and run any application-containing packages in a safe, conveninet, and reliable way.
If you would like to make your package compatible with pipx
, all you need to do is add a console scripts entry point.