Pass --no-deps in PIP requirements txt

0 votes

I need to pass a flag of --no-deps to one of my packages in my requirements.txt file to ignore the dependencies of a package. I've tried putting it above, below, before, and after the package to no avail. I can do it by itself no problem but not within a requirements.txt file

pip install <package> --no-deps

requirements.txt

<package> --no-deps

Can anyone help me with this?

Jun 25, 2019 in Python by ana1504.k
• 7,910 points
9,475 views

1 answer to this question.

0 votes
There is no such option yet for this.

The best you can do is freeze everything from your master environment, and use "--no-deps" when you pip install. This is OK since dependencies will be frozen already.

Hope this helps!
answered Jun 25, 2019 by SDeb
• 13,300 points