Why don't 'pip show' or 'pip list' work for me?
python的
1 | pip list |
或
1 | pip show <pkgname> |
我得到
1 2 3 | Usage: pip COMMAND [OPTIONS] No command by the name pip <cmd> (maybe you meant"pip install <cmd>") |
这些命令是否尚未执行(尽管已记录在案)?
您正在寻找的新功能是非常新的——它们位于1.2.1.post1中,但不在1.2.1中,您可能正在寻找的文档(http://www.pip-installer.org/en/latest/)当前位于1.2.1.post1中。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | localhost-2:~ $ pip --version pip 1.2.1.post1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1.post1-py2.7.egg (python 2.7) localhost-2:~ $ pip --help Usage: pip COMMAND [OPTIONS] Commands: bundle Create pybundles (archives containing multiple packages) freeze Output all currently installed packages (exact versions) to stdout help Show available commands install Install packages list List installed packages (including editables). search Search PyPI show Output installed distributions (exact versions, files) to stdout uninstall Uninstall packages unzip Unzip individual packages zip Zip individual packages |
如果需要,可以获得开发版本:
1 | git clone https://github.com/pypa/pip.git |
它们记录在哪里?我的没有显示任何此类命令:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | hd1 % pip help Usage: pip COMMAND [OPTIONS] --version show program's version number and exit -h, --help Show help -v, --verbose Give more output -q, --quiet Give less output --log <FILENAME> Log file where a complete (maximum verbosity) record will be kept --proxy <PROXY> Specify a proxy in the form user:[email protected]:port. Note that the user:password@ is optional and required only if you are behind an authenticated proxy. If you provide [email protected]:port then you will be prompted for a password. --timeout <SECONDS> Set the socket timeout (default 15 seconds) --exists-action <EXISTS_ACTION> Default action when a path already exists. Use this option more than one time to specify another action if a certain option is not available. Choices: (s)witch, (i)gnore, (w)ipe, (b)ackup Commands available: bundle: Create pybundles (archives containing multiple packages) freeze: Output all currently installed packages (exact versions) to stdout help: Show available commands install: Install packages search: Search PyPI uninstall: Uninstall packages unzip: Unzip individual packages zip: Zip individual packages |
从PIP 1.1开始,可用的命令包括:
- bundle:创建pybundles(包含多个包的归档文件)
- 冻结:将当前安装的所有包(确切版本)输出到stdout
- 帮助:显示可用命令
- 安装:安装软件包
- 搜索:搜索pypi
- 卸载:卸载包
- 解压:解压各个包
- zip:zip单个包
有关已安装软件包的列表,请尝试York。