0

What is the use of -r in this install command?

pip install -r requirments.txt

1 Answers1

4

If we look at the manpage of pip [manpages], we see:

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

It thus means that we specify a file that contains the requirements. You can use it multiple times, for example:

pip install -r requirements1.txt -r requirements2.txt
Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555