Python is not able to handle 2 different versions from the same package.
When Pip <20.3
finds an unresolvable dependency (resolves a dependecy to 2+ versions) then would not halt the installation process.
It’d successfully continue the process by installing the first matching dependency in the list of conflicts.
...
ERROR: pip's dependency resolver does not consider dependency conflicts when
selecting packages. This behaviour is the source of the following dependency
conflicts.
flask 2.2.1 requires click>=8.0, but you'll have click 7.1.2 which is
incompatible.
...
More details can be found here.
This is basically a silent killer because some of the libraries are not going to work runtime but one must
watch the log to catch error (instead of pip
would stop).
Upgrade to >=20.3
which contains a more strict dependency resolution algorithm + stops the installation.