2012-12-27 7 views
7

Python's pip funktioniert für mich, um Pakete zu installieren und zu aktualisieren, aber einige der dokumentierten Befehle scheinen nicht unterstützt zu werden (zumindest mit 1.2.1 unter OS 10.8.2 und Python 2.7.2). Wenn ich versuche,Warum funktionieren 'Pip-Show' oder 'Pip-Liste' nicht für mich?

pip list 

oder

pip show <pkgname> 

ich

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

Diese Befehle sind noch nicht implementiert (trotz dokumentiert wird)?

Antwort

15

Die neuen Funktionen, die Sie suchen, sind sehr aktuell - sie sind in 1.2.1.post1, aber nicht in 1.2.1, und die Dokumente, die Sie wahrscheinlich suchen (http: // www. pip-installer.org/en/latest/) sind derzeit für 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 

Wenn Sie wollen, können Sie die Entwicklungsversion erhalten:

git clone https://github.com/pypa/pip.git 
2

Wo sind sie dokumentiert? Mine zeigt keine solche Befehle:

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

Ich sehe: [document link] (http://www.pip-installer.org/en/latest/usage .html) bringt mich zu 1.2.1.post1., und [ich habe gerade] (http://stackoverflow.com/a/14060138/656912) 1.2.1. – orome

1

die verfügbaren Befehle ab pip 1.1 sind:

  • Bundle: Erstellen pybundles (Archive mit mehreren Paketen)
  • freeze: Ausgabe alle aktuell installierten Pakete (genaue Versionen)
  • Hilfe stdout: Show verfügbare Befehle
  • : installieren von Paketen
  • Suche: Suche PyPI
  • Deinstallation: Deinstallieren von Paketen
  • unzip: Dekomprimieren Sie einzelne Pakete
  • Zip Zip individuelle Pakete

Eine Liste der installierten Pakete, versuchen yolk.

Verwandte Themen