当前位置: 首页 > 工具软件 > Pipx > 使用案例 >

理解pipx VS. pip || end-user application

莫繁
2023-12-01
  • 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’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.

  • 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. With pip 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.

  • Whew does 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.

  • 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.

    理解console scripts entry point in Python

  • References

  1. Home : Technical Terms : End User Definition
  2. wikipedia
  3. End-user application software
  4. Why pipx vs just using pip?
 类似资料: