When I have, for example, a requirements-dev.txt
and a requirements.txt
, I know I can have -r requirements.txt
inside requirements-d
As of today (in pip version 20.0.2), the -t, --target <dir>
option is not supported in requirements.txt
files. The section "Requirements File Format" of pip's User guide lists the currently supported options:
- -i, --index-url
- --extra-index-url
- --no-index
- -c, --constraint
- -r, --requirement
- -e, --editable
- -f, --find-links
- --no-binary
- --only-binary
- --require-hashes
- --pre
- --trusted-host
pip install -r requirements.txt -t /path/to/install
This should work. It worked for me.
If you want different modules to be installed to different locations, then I think you might have to put them into multiple requirements text files. This is at least as far as I know