I have a package P that depends on a package A. Package A depends on packages B and C==3. At the same time, Package B depends on C==4.
This creates conflicts and an akward error message is shown in red every time I pip install packages P or A.
Now, I know I can run packages P and A just fine if I import them in an interactive terminal or Jupyter notebook and I call the functions and classes I need. However, package P has a command line application, which raises an error as long as you have the install conflicts inherited from package A.
This error is not raised by me, it is raised by the Python interpreter alone (I think), since I am not calling any new functionality compared to when I use P as a library. In fact, my CLI is a class wrapped by fire, which I can call without problems in an interactive session.
The error trace shows pkg_resources.ContextualVersionConflict in the end, which I never call in P.
Given that I can only control what happens in package P, is there a way for make it work directly as a command line app?
I am also interested to know what is happening under the hood.
Bytheway, I am always installing P in a new Conda environment.
For package B there is only one version available, not multiple versions.
Thanks!