For the first part, OpenStack fairly widely uses bindep (pbr is a pretty OpenStack ecosystem thing too). It's not really perfect, but it is a fairly standard way for a CI environment deploying from git to ensure the binary dependencies. If a project doesn't have a bindep.txt file, in CI it falls back to [2] for example.
I guess your second point means something like symbol versioning for Python libraries, which I'm not aware of any solution to, apart from just running things in a virtualenv.
[1] https://docs.openstack.org/infra/bindep/readme.html [2] https://github.com/openstack-infra/project-config/blob/maste...