A touch of history:
Way back in the day, before pip, and virtualenv, and …
Python package versioning was problematic, and there were a number of ways folks tried to solve it. In particular, wxPython had wxversion
, that worked something like this (from memory):
import wxversion
wxversion.select('1.2')
And I believe wxGTK, and probably other packages, had their own custom solution as well.
A number of us advocated for building something like this into Python as a standard system. However, there are a lot of issues with this, some of which have been brought up in this thread.
In the end it was the consensus in the community that individual package versioning was not the right solution, and rather, some sort of virtual environment was the right way to go.
So I really don’t think it’s worth bringing up again – trust the very smart people in the community (of years ago ) – use an environment system to control the whole set of packages for an application instead:
Docker, conda, virtualenv, probably others, all work great.