14

I saw this on a jupyter notebook:

!pip install -Uqq fastbook

! runs commands on shell. U stands for upgrade. What do the options qq mean? q stands for quiet.

Why are there two q's?

Looked up pip install --help.
Looked up User guide to no avail.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
agent18
  • 2,109
  • 4
  • 20
  • 34

2 Answers2

21

The option -q of pip give less output.

The Option is additive. In other words, you can use it up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).

So:

  • -q means display only the messages with WARNING,ERROR,CRITICAL log levels
  • -qq means display only the messages with ERROR,CRITICAL log levels
  • -qqq means display only the messages with CRITICAL log level
napuzba
  • 6,033
  • 3
  • 21
  • 32
3

There are 3 logging levels, so -q can be used up to 3 times to hide these message types:

  1. Warning
  2. Error
  3. Critical

This type of option is called "additive," meaning you can apply it more than once to tune the app settings.

So you can use -q to suppress various levels of debug output:

-q:   hide WARNING messages
-qq:  hide WARNING and ERROR messages
-qqq: hide all messages

FYI the option -v is also additive and can be used up to 3 times.

More information available at the pip reference

Adonis Gaitatzis
  • 3,189
  • 26
  • 24