-
pipx
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’snpx
, and Linux’sapt
.It is closely ralated to
pip
. In fact, it usespip
, but is focused on installing and managing Python packages that can be run from the command line directly as applications. -
what is end-user application
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.
-
How is it Different from
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, whilepipx
will allow them to both coexist on the same system. -
Whew does
pipx
install Apps from?By default,
pipx
uses the same packages index aspip
, PyPI.pipx
can also install from all other sources pip can, such as a local directory, wheel, git url, etc. -
console scripts entry point
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. -
References
理解pipx VS. pip || end-user application
最新推荐文章于 2024-03-20 09:38:55 发布