2012-12-27 18 views
7

Python pip pracuje dla mnie, aby zainstalować i zaktualizować pakiety, ale niektóre z udokumentowanych poleceń wydają się nie być obsługiwane (przynajmniej z 1.2.1 z systemem OS 10.8.2 i Python 2.7.2). Kiedy próbujęDlaczego nie działa "pip show" lub "pip list"?

pip list 

lub

pip show <pkgname> 

uzyskać

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

Czy polecenia te nie są jeszcze wdrożone (mimo udokumentowane)?

Odpowiedz

15

Nowe funkcje, których szukasz, są bardzo aktualne - są w wersji 1.2.1.post1, ale nie w wersji 1.2.1 i dokumentach, na które prawdopodobnie patrzysz (http: // www. pip-installer.org/en/latest/) są obecnie dla 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 

Jeśli chcesz je można dostać wersję rozwój:

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

Gdzie są udokumentowane? Kopalnia nie wykazują żadnych takich poleceń:

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

widać: [LINK dokument] (http://www.pip-installer.org/en/latest/usage .html) przenosi mnie do 1.2.1.post1. i [Właśnie mam] (http://stackoverflow.com/a/14060138/656912) 1.2.1. – orome

1

dostępnych poleceń jest jak PIP 1.1:

  • bundle: Tworzenie pybundles (archiwa zawierające wiele pakietów)
  • Freeze: Wyjście wszystkich aktualnie zainstalowane pakiety (dokładnie wersje) do stdout
  • pomocy: Pokaż dostępne polecenia
  • Instalacja: Instalacja pakietów
  • wyszukiwania: Szukaj PyPI
  • odinstaluj: Pakiety Odinstaluj
  • rozpakowane: Rozpakuj pojedynczych opakowań
  • zip: zip indywidualne pakiety

Listę zainstalowanych pakietów, spróbuj yolk.