I have a situation where my Python2.7 project requires a different version than one of my dependencies.
Say, for example, my project has lib1 and lib2. My project requires lib2 v1.1, but lib1 requires lib2 v2.0. Version 2.0 is not backward compatible with v1.1.
How can install both versions of the same package that won't conflict each other or install lib1 with its dependencies isolated and just import it without conflicting with my packages.
Addition: This question is about how to resolve dependencies on different versions of the same package and using them in the same code base.
Is there any general solution to isolate sub-dependencies, and be sure your packages not conflicting each other ?
Having multiple environments where you can use different versions of a dependency won't help for this.