I’m trying to resolve a bug within a pip package that’s preventing a Dockerfile from getting built and I'd like to better understand what pip is doing.
Problem:
When I do a pip install -r requirements.txt it proceeds to install the requirements which includes pathlib even though that’s not within requirement.txt.
This leads me to believe that pip is doing dependency resolution and finding a package that is within requirements.txt, attempting to install it, and then failing because the pathlib it is trying to install does not contain read_text with the PosixPath class (since that was added later after pathlib was added to python in v3.5).
Question:
- How can I see which package has pathlib as a dependency?
- Is there are way to prevent pip from installing an upstream dependency?