

Make sure you have py launcher installed on your machine. When you have more than one Python version on your machine you will need to use py lanucher to launch a specific version of Python. They will be located in different directories. You can have more than one version installed on your machine. In this case, you are not upgrading, but you are installing a new version of Python. If you are upgrading from 3.x to 3.y (minor) then you will be prompted with "Install Now". You also will have to restart a computer after installation. Click on that button and it will replace the existing version with a new one.

Since you already have Python installed on your machine installer will prompt you for "Upgrade Now". If you are upgrading any 3.x.y to 3.x.z (patch) Python version, just go to Python downloads page get the latest version and start the installation. So for example to install Beautiful Soup for Python 3.6, you could run py -3.6 -m pip install beautifulsoup4. Luckily, you can also simply use the py.exe launcher for this: py -m pip runs pip. Unless you explicitly add a Python installation to the PATH, you cannot just use pip though. Current versions of the installer also offer you to install pip it’s enabled by default, so you already have pip for every installation. So if you install a new version and you want to use modules you installed for a previous version, you will have to install them first for the new version. Just use py -2 script.py to launch a script.Īs for PyPI packages, every Python installation comes with its own folder where modules are installed into. Using the launcher, you can also run Python 2 scripts (which are often syntax incompatible to Python 3), if you decide to keep your Python 2.7 installation. You can also specify a version using for example py -3 or py -3.6 to launch a specific version, otherwise the launcher will use the current default (which will usually be the latest 3.x). When running, just use py script.py instead of python script.py to use the launcher. That way, you can easily have multiple Python installations side-by-side without them interfering with each other. This avoids you having to put the current Python installation into PATH yourself. This makes it available from the PATH, so you can automatically run it from any shell just by using py instead of python as the command. If you want to get rid of Python 2.7, you can uninstall it before or after installing a newer version-there is no difference to this.Ĭurrent Python 3 installations come with the py.exe launcher, which by default is installed into the system directory. So if you want to keep your installed Python 2.7 around, then just let it and install a new version using the installer. Only patch versions will upgrade existing installations. Every minor version of Python, that is any 3.x and 2.x version, will install side-by-side with other versions on your computer.
