pipx README

The project's README from github.com/pypa/pipx. As one markdown file: README.md.

pipx — Install and Run Python Applications in Isolated Environments

image PyPI version

Documentation: https://pipx.pypa.io

Source Code: https://github.com/pypa/pipx

For comparison to other tools including pipsi, see Comparison to Other Tools.

Overview: What is pipx?

pipx is a tool to help you install and run end-user applications written in Python. It's roughly similar to macOS's brew, JavaScript's npx, and Linux's apt.

It's closely related 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.

Features

pipx enables you to

Best of all, pipx runs with regular user permissions, never calling sudo pip install.

Install pipx

On macOS

brew install pipx
pipx ensurepath

On Linux

Install pipx with your distribution's package manager. See the Linux installation instructions for commands and alternatives.

pipx ensurepath

On Windows

scoop install pipx
pipx ensurepath

For more detailed installation instructions, see the full documentation.

Quick Start

Install an application globally:

pipx install pycowsay
pycowsay mooo

Run an application without installing:

pipx run pycowsay moo

See the full documentation for more details.

Contributing

Issues and Pull Requests are definitely welcome! Check out Contributing to get started. Everyone who interacts with the pipx project via codebase, issue tracker, chat rooms, or otherwise is expected to follow the PSF Code of Conduct.

pipx (pypa/pipx)

Searching Database…

13K ·GitHub
这是什么?pipx 是一个用来安装和运行 Python 命令行应用的工具。每个应用都放在自己独立的虚拟环境里,所以依赖之间不会互相冲突。
它是包管理器,还是只是 pip 的一层封装?它是一个基于 pip 构建的命令行工具,思路上和 Homebrew、npx、apt 类似,但专门用来把 Python 包的命令行入口作为独立应用暴露出来。
怎么安装一个应用?运行 'pipx install <package>' 可以把应用安装到全局,并放在它自己的独立环境里;运行 'pipx run <package>' 则是临时环境中运行一次,不做安装。
使用前需要先装好 pip 或 venv 吗?只需要系统里有 Python 和 pip。pipx 本身通过系统的包管理器(brew、apt 等)或 pip 安装,并且会自动为你管理虚拟环境。
安装包需要 sudo 吗?不需要。pipx 设计上完全使用普通用户权限运行,从不调用 'sudo pip install'。
在 macOS、Linux 和 Windows 上表现一样吗?是的,pipx 为 macOS、Linux(通过发行版的包管理器)和 Windows 分别提供了专门的安装说明。
卸载用 pipx 安装的应用会发生什么?因为每个应用都有自己独立的环境,卸载时会干净利落地删除该环境及其依赖,不会留下残余文件。
用 pipx 安装的应用可以升级吗?可以。pipx 允许你列出、升级和卸载任何通过它安装的包。
pipx 和直接用 pip install 有什么不同?直接用 pip install 会把包装进共享环境,容易产生依赖冲突;pipx 则让每个命令行应用都有自己的虚拟环境,同时仍把它的命令行入口暴露到全局。
pipx 取代了某个更早的类似工具吗?README 中指向了一个 'Comparison to Other Tools' 章节,其中介绍了 pipsi,这是一个目标相似的早期工具。
What are similar projects?pip, rye, poetry, homebrew-cask, pipenv, ripgrep, bashka, veet
Creator
pypa
Size
5.6 MB
Stars
13K
Age
8y
Commits · 90 Days