跳转到主要内容

用于安装和管理从PyPI安装的命令的工具

项目描述

pipcmd 是一个用于安装和管理从PyPI安装的命令的工具。

安装 pipcmd

安装 pipcmd 与安装 pipcmd 脚本(./bin/pipcmd)在源存储库中到您的 PATH 中一样简单。您还需要将 PATH 设置为包括 ${HOME}/.pipcmd/bin 目录,这是 pipcmd 安装命令的位置。

使用 pipcmd

如果要安装的命令与命令名称相同的项目提供,只需要求 pipcmd 安装该项目即可

$ pipcmd install tox
Installing tox from tox[latest] using python
New python executable in /Users/wsanchez/.pipcmd/env/tox/latest/bin/python
...
Successfully installed pluggy-0.6.0 py-1.5.2 six-1.11.0 tox-2.9.1 virtualenv-15.1.0

如果项目提供的命令名称不同,或提供多个命令,请添加要安装的命令名称

$ pipcmd install twisted trial twist
Installing trial twist from twisted[latest] using python
New python executable in /Users/wsanchez/.pipcmd/env/twisted/latest/bin/python
...
Successfully installed Automat-0.6.0 attrs-17.4.0 constantly-15.1.0 hyperlink-17.3.1 incremental-17.5.0 six-1.11.0 twisted-17.9.0 zope.interface-4.4.3

请注意,pipcmd 不会尝试安装项目提供的每个命令。这可以避免将不需要的命令添加到您的路径中,并且当命令名称被多个项目使用时,它允许您具体指定要安装的项目。

pipcmd 默认使用命令行中找到的 python 命令。可以指定不同的解释器

$ pipcmd install -p python3 mypy
Installing mypy from mypy[latest] using python3
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.5'
New python executable in /Users/wsanchez/.pipcmd/env/mypy/latest/bin/python3
...
Successfully installed mypy-0.560 psutil-5.4.3 typed-ast-1.1.0

pipcmd 默认使用项目的最新版本。可以将项目固定到特定版本。

$ pipcmd install -v 15 twisted twistd
Installing twistd from twisted[15] using python
New python executable in /Users/wsanchez/.pipcmd/env/twisted/15/bin/python
...
Successfully installed twisted-15.0.0 zope.interface-4.4.3

请注意,我们已经从 Twisted 的最新版本中安装了 trialtwist,但 twistd 来自 Twisted 15。在这种情况下,这可能或可能不是好主意,但 pipcmd 并不评判。

列出已安装的命令

$ pipcmd list
mypy from mypy[latest] using CPython 3.5.3
tox from tox[latest] using CPython 2.7.10
trial from twisted[latest] using CPython 2.7.10
twist from twisted[latest] using CPython 2.7.10
twistd from twisted[15] using CPython 2.7.10

删除命令

$ pipcmd remove twist twistd
Removing: twist from twisted[latest] using CPython 2.7.10
Removing: twistd from twisted[15] using CPython 2.7.10

项目详情


发布历史 发布通知 | RSS 源

下载文件

下载适用于您平台上的文件。如果您不确定选择哪一个,请了解有关 安装包 的更多信息。

源分布

pipcmd-0.1.tar.gz (5.2 kB 查看哈希值)

上传时间

由以下支持