Earlier quoted context omitted.
>Most people just cross their fingers and hope dependencies don't change Is there anything wrong with pip freeze > requirements.txt and then pip install -r requirements.txt ? This would install the exact versions
If you have "foo==0.1" installed, and foo has the dep "bar~=0.2" (current vers of bar 0.2.1). Then bar releases version 0.2.2 So your deps want bar 0.2.1, but foo now wants bar 0.2.2 This breaks your pip install. EDIT: there are a few other gotchas (please respond to this post if you know of any more) e.g. from https://medium.com/knerd/the-nine-circles-of-python-dependen... "If two of your dependencies are demanding…
https://github.com/pandas-dev/pandas/issues/27206
All of a sudden, a numpy release pulls in a new version for a pandas build (that incidentally breaks for py2)
This without involving a "~=", but rather because pandas needs to build from source, and chooses the latest numpy build to do so.