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, blow, 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
The most common command is pip freeze > requirements. txt , which records an environment's current package list into requirements. txt. If you want to install the dependencies in a virtual environment, create and activate that environment first, then use the Install from requirements.
pip is capable of determining and installing the dependencies of packages. The process of determining which version of a dependency to install is known as dependency resolution. This behaviour can be disabled by passing --no-deps to pip install.
Unfortunately, pip makes no attempt to resolve dependency conflicts. For example, if you install two packages, package A may require a different version of a dependency than package B requires. Pip can install from either Source Distributions (sdist) or Wheel (. whl) files.
Unfortunately there is no option for this, at time of writing.
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.
According to the documentation you have to write:
<package> --install-option="--no-deps"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With