2012-12-27 77 views
7

Python的pip正在爲我安裝和更新軟件包,但一些文檔化的命令似乎不被支持(至少在OS 10.8.2和Python 2.7.2上運行1.2.1)。當我嘗試爲什麼'pip show'或'pip list'不適合我?

pip list 

pip show <pkgname> 

我得到

Usage: pip COMMAND [OPTIONS] 
No command by the name pip <cmd> 
    (maybe you meant "pip install <cmd>") 

難道這些命令還沒有實現(儘管被記錄)?

回答

15

您正在尋找的新功能是最近的 - 它們在1.2.1.post1中,但不在1.2.1中,以及您可能正在查看的文檔(http:// www。 pip-installer.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 
2

他們在哪裏記錄?礦不顯示出任何這樣的命令:

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:[email protected] 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 
+0

我看到:[文件鏈接](http://www.pip-installer.org/en/latest/usage .html)帶我到1.2.1.post1。和[我只有](http://stackoverflow.com/a/14060138/656912)1.2.1。 – orome

1

可用命令包括作爲PIP 1.1的是:

  • 束:創建(包含多個包歸檔文件)pybundles
  • 凍結:輸出所有當前已安裝的軟件包(確切的版本)到stdout
  • 幫助:顯示可用的命令
  • 安裝:安裝軟件包
  • 搜索:搜索的PyPI
  • 卸載:卸載程序包
  • 解壓:解壓縮單個包
  • 郵編:郵編單獨包裝

對於安裝包的列表,請嘗試yolk