8

Pythonpipはパッケージのインストールと更新に取り組んでいますが、文書化されたコマンドの一部はサポートされていないようです(少なくとも、OS10.8.2とPython2.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>")

これらのコマンドはまだ実装されていませんか(文書化されていますが)?

4

4 に答える 4

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
于 2012-12-27T19:26:38.417 に答える
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: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
于 2012-12-27T19:22:41.477 に答える
1

使用可能なコマンドは、pip1.1以降です。

  • バンドル:pybundles(複数のパッケージを含むアーカイブ)を作成します
  • フリーズ:現在インストールされているすべてのパッケージ(正確なバージョン)をstdoutに出力します
  • ヘルプ:使用可能なコマンドを表示する
  • インストール:パッケージをインストールします
  • 検索:PyPIを検索
  • アンインストール:パッケージをアンインストールします
  • 解凍:個々のパッケージを解凍します
  • zip:個々のパッケージを圧縮します

インストールされているパッケージのリストについては、yolkを試してください。

于 2012-12-27T19:23:43.727 に答える
1

回避策として、を使用できる場合がありますpip freeze

ヘルププロンプトから:

freeze: Output all currently installed packages (exact versions) to stdout
于 2020-04-22T13:33:49.670 に答える