1233023
1233023

Reputation: 321

Install subset of packages listed in a requirements.txt file with PIP

I'm wondering if it's possible to install a subset of the packages listed in a requirements file using the PIP CLI command or do I have to wrangle stuff in a makefile to get something like this?

pip install -r [package1, package2] requirements.txt

Regards

Upvotes: 2

Views: 1028

Answers (1)

sinoroc
sinoroc

Reputation: 22473

Not sure it would do exactly what you have in mind, but you could try something like:

python -m pip install Something Another --constraint requirements.txt

See pip' documentation section on constraints files.

Upvotes: 3

Related Questions