ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. cosmic-ray 8.3.5 requires virtualenv<=16.7.10, but you have virtualenv 20.21.0 which is incompatible.
Cosmic-ray uses very old version of virtualenv and its causing conflicts with other modules which uses relatively newer versions.
In my requirements-dev.txt, I have two packages, one internally use another package virtualenv with version 20 and another one with virtualenv version 16. When I try to install the packages I get the above error.
How should we handle such scenarios?
I tried the normal ways of not mentioning the version in requirements.txt but same error happens.
There is no way for two versions of the same Python package to live in the same place. The dependency resolver in Python does not allow this.
In this case, there are a few things that you can do to help solve this problem:
condato manage my dependencies and their versions.virtualenv, or try to split your project into multiple pieces.