1 | initial version |
My favorite tool for testing Python code using different versions of dependencies is Virtualenv. The top answer on this stackoverflow question explains the process for getting a virtualenv to use the desired opencv version.
Here is a quick tutorial on the basics of virtualenv.
I hope this helps!