← 返回命令列表

Linux command

pip-config 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

List configuration

pip config list

Get specific setting

pip config get [key]

Set configuration value

pip config set [key] [value]

Edit config file

pip config edit

Delete setting

pip config unset [key]

说明

pip config manages pip's configuration files at different scopes. It provides a command-line interface for reading, writing, and editing pip settings without manually locating and editing INI-format configuration files. Configuration is organized into three levels: global (system-wide), user (per-account), and site (per-virtualenv). Settings cascade so that more specific scopes override broader ones. Common settings include custom package index URLs, trusted hosts for private registries, and default installation options. Use pip config list to see all active settings and their sources, or pip config debug to display the full search path and which files exist. The edit subcommand opens the appropriate config file in your default editor.

参数

list
List active configuration.
get _key_
Get configuration value.
set _key_ _value_
Set configuration value.
unset _key_
Remove configuration value.
edit
Edit config file in editor.
debug
Show configuration files and values.
--global
Use global configuration file.
--user
Use user configuration file.
--site
Use site configuration file.

FAQ

What is the pip-config command used for?

pip config manages pip's configuration files at different scopes. It provides a command-line interface for reading, writing, and editing pip settings without manually locating and editing INI-format configuration files. Configuration is organized into three levels: global (system-wide), user (per-account), and site (per-virtualenv). Settings cascade so that more specific scopes override broader ones. Common settings include custom package index URLs, trusted hosts for private registries, and default installation options. Use pip config list to see all active settings and their sources, or pip config debug to display the full search path and which files exist. The edit subcommand opens the appropriate config file in your default editor.

How do I run a basic pip-config example?

Run `pip config list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list do in pip-config?

List active configuration.