Return to site

Managing python versions

broken image
broken image

Python doesn't create pythonX.Y binaries on Windows.We don't have any context to your OS, but I'm going to assume Windows for my response, as installing multiple versions is easiest, most prevalent, and most cumbersome there. On operating systems that don't have a standard package manager you would need to use a third party one such as Chocolatey for Windows, Homebrew for macOS.

broken image

On most operating systems you can also use a package manager to take care of things. You can do this with virtual machines as well but they of course have a much greater overhead.Īlso, it is good practice to use a Python Virtual Environment for each project with only the libraries installed needed by the project in each environment to avoid polluting the base environment. In most cases you simply need to check and edit your PATH settings and remove any shims you don't want.Īnother approach is to use docker containers so you only have the version you require in any particular container. There are a number of tools you can use to manage multiple versions such as pyenv (especially on *nix systems). Usually, on macOS and Windows, simply installing Python using the Python Software Foundation installation package from will make the latest version the default Python 3 installation.

broken image