2

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
  • 4,487
  • 7
  • 29
  • 33

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
  • 18,409
  • 2
  • 39
  • 70