pip offers -v, –verbose and -q, –quiet
to control the console log level. Each option can be used multiple times and
used together. One
-v increases the verbosity by one, whereas one
-q decreases it by
The series of log levels, in order, are as follows:
VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL
NOTIFY is the default level.
A few examples on how the parameters work to affect the level:
- specifying nothing results in
The most practical use case for users is either
-vv to see
additional logging to help troubleshoot an issue.
pip offers the –log option for specifying a file where a maximum verbosity log will be kept. This option is empty by default. This log appends to previous logging.
Additionally, when commands fail (i.e. return a non-zero exit code), pip writes a “failure log” for the failed command. This log overwrites previous logging. The default location is as follows:
- On Unix and Mac OS X:
- On Windows, the configuration file is:
The option for the failure log, is –log-file.
Both logs add a line per execution to specify the date and what pip executable wrote the log.
Like all pip options,
log-file, can also be set as an environment
variable, or placed into the pip config file. See the Configuration
Give more output. Option is additive, and can be used up to 3 times.
Show version and exit.
Give less output.
Path to a verbose non-appending log, that only logs failures. This log is active by default at <see File logging>.
Path to a verbose appending log. This log is inactive by default.
Specify a proxy in the form [user:passwd@]proxy.server:port.
Set the socket timeout (default 15 seconds).
Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
Path to alternate CA bundle.