What does " -r " do in pip install -r requirements.txt

SuperCow picture SuperCow · Jun 28, 2016 · Viewed 22.4k times · Source

I looked up how to install multiple packages from a requirements document using pip. The answers were mostly:

 pip install -r requirements.txt

What does the -r do though? I can't find an answer for this and it isn't listed when I run pip help.

Answer

alecxe picture alecxe · Jun 28, 2016

Instead of pip --help, look into pip install --help:

-r, --requirement Install from the given requirements file. This option can be used multiple times.

Also see these documentation paragraphs: