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. Only patch versions will upgrade existing installations.

So if you want to keep your installed Python 2.7 around, then just let it and install a new version using the installer. 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.

Current Python 3 installations come with the py.exe launcher, which by default is installed into the system directory. 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. This avoids you having to put the current Python installation into PATH yourself. That way, you can easily have multiple Python installations side-by-side without them interfering with each other. When running, just use py script.py instead of python script.py to use the launcher. 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).

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. Just use py -2 script.py to launch a script.


As for PyPI packages, every Python installation comes with its own folder where modules are installed into. 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. Current versions of the installer also offer you to install pip; it’s enabled by default, so you already have pip for every installation. Unless you explicitly add a Python installation to the PATH, you cannot just use pip though. Luckily, you can also simply use the py.exe launcher for this: py -m pip runs pip. So for example to install Beautiful Soup for Python 3.6, you could run py -3.6 -m pip install beautifulsoup4.

Answer from poke on Stack Overflow
🌐
BlueVPS
bluevps.com › blog › how to update the python version: step-by-step guide install python and upgrade python version
How to Update the Python Version - Blog - BlueVPS
Run the Windows PowerShell as administrator on your system. To install Python or update the Python version, you need to install “Windows Chocolatey Package Manager.” To install Chocolatey on Windows, run the following command:
Top answer
1 of 10
180

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. Only patch versions will upgrade existing installations.

So if you want to keep your installed Python 2.7 around, then just let it and install a new version using the installer. 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.

Current Python 3 installations come with the py.exe launcher, which by default is installed into the system directory. 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. This avoids you having to put the current Python installation into PATH yourself. That way, you can easily have multiple Python installations side-by-side without them interfering with each other. When running, just use py script.py instead of python script.py to use the launcher. 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).

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. Just use py -2 script.py to launch a script.


As for PyPI packages, every Python installation comes with its own folder where modules are installed into. 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. Current versions of the installer also offer you to install pip; it’s enabled by default, so you already have pip for every installation. Unless you explicitly add a Python installation to the PATH, you cannot just use pip though. Luckily, you can also simply use the py.exe launcher for this: py -m pip runs pip. So for example to install Beautiful Soup for Python 3.6, you could run py -3.6 -m pip install beautifulsoup4.

2 of 10
148

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. Since you already have Python installed on your machine installer will prompt you for "Upgrade Now". Click on that button and it will replace the existing version with a new one. You also will have to restart a computer after installation.

If you are upgrading from 3.x to 3.y (minor) then you will be prompted with "Install Now". In this case, you are not upgrading, but you are installing a new version of Python. You can have more than one version installed on your machine. They will be located in different directories. 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.

For instance:

py -3.7

or

py -3.8

Make sure you have py launcher installed on your machine. It will be installed automatically if you are using default settings of windows installer. You can always check it if you click on "Customize installation" link on the installation window.

If you have several Python versions installed on your machine and you have a project that is using the previous version of Python using virtual environment e.g. (venv) you can upgrade Python just in that venv using:

python -m venv --upgrade "your virtual environment path"

For instance, I have Python 3.7 in my ./venv virtual environment and I would like upgrade venv to Python 3.8, I would do following

python -m venv --upgrade ./venv

Discussions

How to Upgrade Python version on Kudu Power Shell on Azure Function Windows App
Hi, I have deployed a Http Trigger Function which relies on external python script in order to perform some graphQL API calls. On my local environment I run the script with python 3.12 whereas in the Azure environment I noticed that the python version… More on learn.microsoft.com
🌐 learn.microsoft.com
2
0
Can you update Python on Windows from the command line?
There's a paragraph on that page aptly titled "4.1.3. Installing Without UI" More on reddit.com
🌐 r/learnpython
4
3
January 11, 2022
windows - Update Python via Powershell - Geographic Information Systems Stack Exchange
We currently have older Windows QGIS installations on our clients that utilize Python 3.9.5.0. Due to identified vulnerabilities in this version, we are seeking to upgrade to the latest supported v... More on gis.stackexchange.com
🌐 gis.stackexchange.com
March 26, 2024
Install Python with cmd or powershell - Stack Overflow
Also, you could download the zipped version and just copy it to a folder and update the path. 2018-10-04T12:45:16.38Z+00:00 ... Expand-Archive YourPackage.zip -DestinationPath c:/python37 and to add your python folder to the path using Powershell, see here: codingbee.net/tutorials/powershell/… ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2133129 › how-to-upgrade-python-version-on-kudu-power-shell
How to Upgrade Python version on Kudu Power Shell on Azure Function Windows App - Microsoft Q&A
In the Kudu console, click on the "Debug console" and select "PowerShell". ... Download the desired Python version (e.g., Python 3.12) from the official Python website.
🌐
4sysops
4sysops.com › home › blog › articles › upgrade python in windows
Upgrade Python in Windows – 4sysops
February 20, 2024 - It is Microsoft’s package manager and comes preinstalled in some versions of Windows. You can compare it to a package manager like apt Ubuntu. Open PowerShell and execute the winget command as below, to upgrade Python:
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.14.4 documentation
To install the file downloaded from python.org, either double-click and select “Install”, or run Add-AppxPackage <path to MSIX> in Windows Powershell.
🌐
GitHub
gist.github.com › raoshaab › de861c353ab0e0cb77f8afd5325e43c1
Install Python 3 with powershell in windows 10 · GitHub
# Download the latest version of Python from the official website $pythonUrl = "https://www.python.org/ftp/python/3.10.0/python-3.10.12-amd64.exe" $pythonInstaller = "$($env:TEMP)\python.exe" Invoke-WebRequest -Uri $pythonUrl -OutFile $pythonInstaller # Install Python with default settings Start-Process -FilePath $pythonInstaller -ArgumentList "/quiet" -Wait # Add Python to the PATH environment variable $pythonPath = Join-Path $env:ProgramFiles "Python310" [System.Environment]::SetEnvironmentVariable("Path", "$($env:Path);$pythonPath", "User") # Verify the installation python --version ... Now Updated !!
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › can you update python on windows from the command line?
r/learnpython on Reddit: Can you update Python on Windows from the command line?
January 11, 2022 -

Is it possible to install or update Python system-wide through a command in CMD, Powershell, or WSL2 Bash like on Linux?

The full Python launcher installation executable file at https://docs.python.org/3/using/windows.html looks very large and spread out, compared to the single package in Unix / Linux

🌐
GitHub
github.com › HealthCatalyst › PythonPowershellUtilities
GitHub - HealthCatalyst/PythonPowershellUtilities: The only powershell module you should ever need. · GitHub
A powershell module for installing python versions and managing python virtual environments - on windows. There are several good tools available for managing python installations and virtual environments for *nix.
Starred by 10 users
Forked by 2 users
Languages   PowerShell
🌐
4Geeks
4geeks.com › how-to › how-to-update-python-version
How to update Python version?
July 16, 2025 - 1# On windows Powershell 2$ choco upgrade python -y 3 4# MacOs homebrew with pipenv 5# you would need to install python first 6$ pyenv install 3.9.2 7 8# linux 9$ sudo add-apt-repository ppa:deadsnakes/ppa 10$ sudo apt update 11$ sudo apt install python3.9
🌐
Python Forum
python-forum.io › thread-37434.html
PowerShell script file for updating packages
I have excluded some problem packages. pip list --outdated --exclude idna --exclude mistune --exclude tomli --format=freeze --user > req0.txt $content = Get-Content -Path 'req0.txt' $newContent = $content -replace '==', '>=' $newCon...
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › python
Python on Windows for beginners | Microsoft Learn
February 26, 2026 - Install Python 3.13: Install Python 3 from the Microsoft Store. The Microsoft Store version automatically configures your PATH and provides automatic updates. Once installed, open PowerShell and run python --version to verify.
🌐
Super User
superuser.com › questions › 1778898 › how-to-use-python-again-in-windows-powershell
command line - How to use `python` again in windows PowerShell? - Super User
Visit the "Settings > Manage App Execution Aliases" screen it mentions, disable the python.exe alias pointing to this redirector, and enable the python.exe alias that belongs to your actually installed Python runtime (if you had it installed ...
🌐
Stack Exchange
gis.stackexchange.com › questions › 479072 › update-python-via-powershell
windows - Update Python via Powershell - Geographic Information Systems Stack Exchange
March 26, 2024 - When it comes to bundled Python deployments, they should always be updated by the program they are bundled with because upgrading the Python version yourself could cause things to break.
🌐
CodeGenes
codegenes.net › blog › how-to-update-python-on-windows-command-line
Updating Python on Windows Command Line: A Comprehensive Guide — codegenes.net
To update all installed Python packages, you can use the following script. First, create a batch file (e.g., update_packages.bat) with the following content: @echo off pip freeze > requirements.txt for /f "delims==" %%i in (requirements.txt) do pip install --upgrade %%i del requirements.txt ... If you encounter permission issues when using pip to update packages, you can run the Command Prompt or PowerShell as an administrator.
🌐
CodeGenes
codegenes.net › blog › how-to-update-python-in-windows
How to Update Python in Windows — codegenes.net
This will allow you to use Python from the Command Prompt or PowerShell without specifying the full path. Click "Install Now" to start the installation process. Wait for the installation to finish. Once it's done, the installer will display a success message. If you use a virtual environment and the pip package manager, you can update ...
🌐
DEV Community
dev.to › jajera › install-python-on-windows-via-cli-winget-3lnm
Install Python on Windows via CLI (winget) - DEV Community
September 23, 2025 - Here’s how you can install Python 3 in seconds, entirely from the terminal. Press Win + X → select Windows PowerShell (Admin) or Terminal (Admin).