Split requirements files in pip

The -r flag isn’t restricted to command-line use only, it can also be used inside requirements files. So running pip install -r req-1-and-2.txt when req-1-and-2.txt contains this:

-r req-1.txt
-r req-2.txt

will install everything specified in req-1.txt and req-2.txt.

Leave a Comment