pip config

使用方法

python -m pip config [<file-option>] list
python -m pip config [<file-option>] [--editor <editor-path>] edit

python -m pip config [<file-option>] get command.option
python -m pip config [<file-option>] set command.option value
python -m pip config [<file-option>] unset command.option
python -m pip config [<file-option>] debug
py -m pip config [<file-option>] list
py -m pip config [<file-option>] [--editor <editor-path>] edit

py -m pip config [<file-option>] get command.option
py -m pip config [<file-option>] set command.option value
py -m pip config [<file-option>] unset command.option
py -m pip config [<file-option>] debug

説明

ローカルおよびグローバル設定を管理します。

サブコマンド

  • list: アクティブな設定(または指定されたファイルからの設定)をリストします

  • edit: エディターで設定ファイルを編集します

  • get: command.optionに関連付けられた値を取得します

  • set: command.option=valueを設定します

  • unset: command.optionに関連付けられた値をアンセットします

  • debug: 設定ファイルとそれらで定義された値をリストします

設定キーは、コマンドとオプション名をドットで区切ったものにする必要があります。特別なプレフィックス「global」は任意のコマンドに影響を与えます。たとえば、「pip config set global.index-url https://example.org/」はすべてのコマンドのインデックスURLを設定しますが、「pip config set download.timeout 10」は「pip download」コマンドのみに10秒のタイムアウトを設定します。

--user、 --global、 --siteのいずれも渡されない場合、仮想環境設定ファイルがアクティブであり、ファイルが存在する場合は使用されます。それ以外の場合は、すべての変更がデフォルトでユーザーファイルに対して行われます。

オプション

--editor <editor>

ファイルの編集に使用するエディター。指定されていない場合は、VISUALまたはEDITOR環境変数を使用します。

(環境変数: PIP_EDITOR)

--global

システム全体の構成ファイルのみを使用します

(環境変数: PIP_GLOBAL)

--user

ユーザー構成ファイルのみを使用します

(環境変数: PIP_USER)

--site

現在の環境構成ファイルのみを使用します

(環境変数: PIP_SITE)