FWIW, there’s an open issue about pip “fixing” its behaviour and enforcing consistent environments: Take installed packages into account when upgrading another package · Issue #9094 · pypa/pip · GitHub
It is technically feasible for pip’s resolver to take existing packages into account when doing upgrades. IIRC, I’d pushed back on implementing it at the time since I didn’t trust the metadata in the ecosystem at the time and we didn’t have any mechanism for ignoring bad metadata within the resolver (we still don’t, but both can be fixed/changed). And, there was also limited time available in the grant-funded work and we couldn’t have resolved this in time.
I do agree that we should avoid going into more detail about the pip’s resolver behaviours here – if someone wants to do that, let’s do that in a separate place/topic/whatever.