Version Isolation

Is the default for a new version of Python to always install as a an entirely separate Python installation? I have 3.6 installed, so if I install 3.8 it will not step on any part of the 3.6 installation. I can then set one or the other as my default environment and use the #!python3.6 or #!python3.8 at the top of my scripts to direct them to us a particular version?

Hi there lospinoj! Are you using the state tool to install your Python versions? The state tool will create separate virtual environments for your python versions by default. If you’re installing from the MSI/tarball then you can choose where you want to extract the installation to. If using the MSI, and you have symlinks/shortcuts named python3.6 or python3.8 on your PATH, then that shebang will work.

The state tool also provides the ability to easily swap between versions of python, and you can even create an activestate.yaml file in your project folder that points to the version of python you want it to use for that particular project.

That’s great to know and will definitely be taking a look at that, but will a new version install not step on an earlier version by default?

If you’re using the state tool — it will not step on earlier versions, it always installs them into a separate sandboxed location. If you’re using the MSI installer, you would have to make sure you select a location that doesn’t conflict with an earlier location.

1 Like