[英]Why don't 'pip show' or 'pip list' work for me?
Python 的pip
正在為我安裝和更新軟件包,但似乎不支持某些記錄的命令(至少在 OS 10.8.2 和 Python 2.7.2 上運行的 1.2.1)。 當我嘗試
pip list
要么
pip show <pkgname>
我得到
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.js) 中。 org/en/latest/) 目前用於 1.2.1.post1。
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
如果你想要它們,你可以獲得開發版本:
git clone https://github.com/pypa/pip.git
它們在哪里記錄? 我的沒有顯示任何這樣的命令:
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:passwd@proxy.server:port. Note that the user:password@ is optional and required only if you are behind an authenticated proxy. If you provide
user@proxy.server: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 開始,可用的命令是:
有關已安裝軟件包的列表,請嘗試yolk 。
作為一種解決方法,您可以使用pip freeze
。
從幫助提示:
freeze: Output all currently installed packages (exact versions) to stdout
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.