Contents
How do I change Python version in Windows?
Set your preferred default version by setting the PY_PYTHON environment variable (e.g. PY_PYTHON=3.7) . You can see what version of python is your default by typing py . You can also set PY_PYTHON3 or PY_PYTHON2 to specify default python 3 and python 2 versions (if you have multiple).
How do I switch between Python versions?
To switch between python version over the all users, we can use update-alternatives command. We will set priority of each version using update-alternatives. Python executable with the highest priority will be used as default python version.