I searched before asking this question but i did get exact answer. can anyone let me know where to read about these operators and others like same as this? Thanks in advance.
-
https://stackoverflow.com/search?q=%5Bpip%5D+%22pip+install+-r+requirements.txt%22+what+%22-r%22 , https://stackoverflow.com/search?q=%5Bpython%5D+what+%22-m%22 – phd Dec 20 '21 at 11:24
4 Answers
Run python -h
to get a list of arguments and their function.
-m
is used to run a library module as a script. In this case you're running pip
as a script.
-r
is from pip
so you can do pip -h
for more detail. pip install
also has options, so you can do pip install -h
for even more detail (you see where this is going). The general idea is -r
is meant to install from a requirements file and are treated as dependencies of sorts.

- 3,660
- 2
- 19
- 31
You can use --help
to print out the possible set of arguments that a command can take. If you use pip install --help
, it will show the arguments and their meaning. See below for the meaning of -r flag:
-r, --requirement <file> Install from the given requirements file. This option can be used multiple times.

- 217
- 3
- 7
-r
is used as a way to tell pip to install packages from the requirements file (Usage: pip3 install -r <file>
. -r
can also be written as --requirement
you can use pip install --help
to learn about more arguments you can use with pip install

- 303
- 3
- 15
It means install packages from the given requirements file:
pip install -r <file>
or
pip install --requirement <file>

- 2,140
- 8
- 23