Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install options unclear

Tags:

python

pip

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.

like image 926
agent18 Avatar asked Oct 09 '20 09:10

agent18


People also ask

Why pip install is not working?

A “pip: command not found” error occurs when you fail to properly install the package installer for Python (pip) needed to run Python on your computer. To fix it, you will either need to re-install Python and check the box to add Python to your PATH or install pip on your command line.

How do I clear my pip cache?

If you want to force pip to clear out its download cache and use the specific version you can do by using --no-cache-dir command. If you are using an older version of pip than upgrade it with pip install -U pip. This will help you clear pip cache.

How do I Intall pip?

Step 1: Download the get-pip.py (https://bootstrap.pypa.io/get-pip.py) file and store it in the same directory as python is installed. Step 2: Change the current path of the directory in the command line to the path of the directory where the above file exists. Step 4: Now wait through the installation process.


2 Answers

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
like image 61
napuzba Avatar answered Sep 28 '22 08:09

napuzba


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

like image 29
Adonis Gaitatzis Avatar answered Sep 28 '22 07:09

Adonis Gaitatzis