Here is how I switch between different versions of python. It could be extended to handle different versions of qt, but I haven't done that.
The advantages of my scheme are:
- It uses no extra software, just python and pip.
- It does not change the state of the system in any way.
- It makes no changes to system settings.
- It does not use sitecustomize.py.
- It allows me to install all my Leo-related software in my home directory.
For each version V (say 3.9), of python, I do the following:
- Install python 3.9 in my home directory, choosing "no" when asked if I want to change the system's path var.
- Create aliases (.bat files) for leo39 and pip39.
- Create aliases (.bat files) that open various .leo files using python 3.9. These aliases all call leo39.
Python 3.9 is the default, I also create aliases that don't have a version number. But not plain "pip": I want to have to specify the version number explicitly when I install packages.
That's all.
Summary
I use aliases (.bat files) to specify the desired environment. aliases without a version suffix denote the default environment.
This scheme works well for me. You might like it as well.
Edward