is there anyway to use pip to see who needs a module BEFORE uninstall? how?
here's why i'm asking:
In RPM package land:
- each package lists it's own software deps
- when you go to do a
yum remove NAME
yum says "PACKAGE_A, PACKAGE_B, ... each depend onNAME
" and then yum will bring up an interactive prompt asking "do you want to remove NAME and PACKAGE_A, PACKAGE_B, ..., yes or no?" - yum has told me that doing a
yum remove NAME
would break other things... and so i say "no" and reconsider (or say yes because i want PACKAGE_A, PACKAGE_B, ..., removed)
In PIP package land:
- each package lists it's own software deps
- when you go to do a
pip uninstall botocore
pip says "do you want to remove ${list_of_files_for_botocore_package}, yes or no?" - you say yes because you want to remove botocore
- then you are afraid of breaking stuff so you do
- pip check
- then you see "boto3 ... requires botocore, which is not installed"
- pip uninstall has now left one or more modules in a broken state
- even though pip knew ahead of time that boto3 required botocore...
- pip could have warned me or said something or offered to remove boto3 like yum did
i guess i could write some python code to construct a graph... then figure out who needs botocore by looking at the graph... but i'm wondering... does pip already have such a feature already? seems like the default behavior is not that good (it should at least print a message).