1

How can pip skip only one dependency while install all the others. Using --no-deps, --no-dependencies as answered on this topic would not work since it prevents all depencencies.

The reason I need to skip a single dependency is due to the fact this dependency is not compatible under my environment (I have a personalized version of this dependency instead)

Rafael Borja
  • 3,937
  • 6
  • 23
  • 32

1 Answers1

1

Maybe use a requirements.txt or constraints.txt file to let pip know to use your modified version of the dependency. These 2 files have different meanings and different options that they can handle, so depending on your exact needs one or the other might be a better fit. I would recommend using the constraints.txt file if possible.

A.

# requirements.txt
TheDependency --find-links /path/to/dir/containing/modified-dependency
python -m pip install Something --requirement requirements.txt

B.

# constraints.txt
TheDependency @ /path/to/modified-dependency-1.2.3.whl
python -m pip install Something --constraint constraints.txt
sinoroc
  • 12,887
  • 1
  • 23
  • 54