How to update python on windows

In this article, we are going to see how to update Python in the Windows system. For the sake of example, we will be upgrading from Python 3.6.8 to Python 3.9.6.

To check the current version of python on your system, use the following command in the command prompt:

python -V

This will show you your current python version as shown below:

Using the executable installer:

Follow the below steps to update your python version:

Step 1: Go to Python’s official site.

Step 2: Click on the Downloads tab.

Here you will get a list of available releases.

Step 3: Download the version you need to upgrade to based on your system specifications(ie, 32-bit or 64-bit). Here we will be downloading the 64-bit installer for 3.9.6.

Step 4: Click on the installer and it will begin the installation. Make sure to select the “Add Python 3.9 to PATH” option. and click on “Install Now”.

This will start the installation as shown below:

After the installation is successful you will get the following message:

Now if you open up your cmd and use the below command:

python -V

You’ll see your version of Python has been updated to 3.9.6 as shown below:

Last Updated :
31 Aug, 2021

Like Article

Save Article

How to Update Python Version? - [Upgrade Python Version]

List of content you will read in this article:

Python is an open-source high-level programming language that allows users to execute commands, plugins on their machine, and even software from several major suppliers. It means you can operate it on many different operating systems, including the Windows VPS Server. Python is a cross-platform programing language.

Pip is one of the best applications for Python package installation and administration. Pip’s popularity stems from the many apps that use this tool. Pip enables 3rd Party package installed to manage binary packages with the quickly configured package manager. Since Python’s latest releases have piping as normal, this guide will explain how to install PIP and how to update Python version with a complete step-by-step guide.

What is PIP?

PIP is a software management framework for installing and managing Python-written program packages. It is called the ‘preferred software installer’ or ‘Pip Installs Packages.’ PIP, used for Python, is a command-line interface for handling PyPI program installation. You might need to upgrade PIP if you’re using an earlier version of Python on Windows. Download the application file, open the command- line and start the installer to run PIP on Windows quickly. It will teach you how PIP is installed on Windows and how it can be modified, upgraded, and set up.

How to update Python on Windows Operating System?

There are two simple ways to update your current Python version with the latest one. They are as follows: 

  1. Using the Python Installer
  2. Using the Windows Chocolatey Package Manager

So let’s see how we can update the Python version with these two methods, one by one.

Method 1: Python update on Windows using the Python Installer

This method of updating the Python version will work if Python is installed or not on your System.

If Python is already installed on your system, you can check it using the python -V command.

Step 1: Download the Python installer from the Official Website of Python

The easiest way to update the Python version is to download the latest version from the official website (https://www.python.org/downloads/)

You can click on the Download Python 3.11.0 button, and it will download the latest compatible Python version for your system.

Step 2: Install the Downloaded Python Installer

After downloading the exe file, double-click on it to install Python.

Step 3: Install Python

Now, you can install the latest version of Python.

Check the “Add python.ext to PATH”, then click on the “Install Now” button.

This will start the installation process. 

After processing, the latest version of Python will be installed on your system. 

Click on the “Close” Button.

Step 4: Verify the Update

After successful installation, you can verify whether or not the latest version is installed on your system. To check the version, you can again run the same command, python -V, on the prompt command.

Now, you can see that it is showing the latest installed version, i.e., Python 3.11.0.

Note: If it still shows the old version, you may restart your system. Or uninstall the old version from the control panel.

Method 2: Install Python using Command Line Only using the Chocolatey Package Manager

Chocolatey is a Package Manager command line tool for windows, and we can use it to install software for our window system. In our case, we can use it to install Python or update the current version of Python.

Step 1 Open The Powershell as Administrator

To install Chocolatey, you need to open PowerShell as Administrator.

Step 2: Install the Chocolatey Package Manager Command

Now, you can install the Chocolatey package manager using the following command.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Step 3: Verify the Chocolatey Installation

Now, you need to check whether Chocolatey has been installed successfully. To check it, run the “choco” command.

It is installed successfully because it is showing version Chocolatey v1.2.0.

Step 4: Update Python with Chocolatey

With the help of the choco upgrade command, we can update our current Python version.

choco upgrade python -y

Step 5: Verify the Version

You can again check the latest installed Python version using the following command.

python -V

Note: The old version of Python will remain on your system. You can uninstall the old version from the control panel.

How To Upgrade Python on macOS?

You can download the latest version of Python for macOS from the official Python website, similar to what you did on windows OS to update Python version on your system. To check whether it is updated to the lasted version or not, follow the below-listed commands to check the Python version.

$ python --version

Python 2.x.x

$ python3 --version

Python 3.9.0

If you want to execute this new Python release with the python command instead of python3, install an alias in your $HOME directory’s bash profile file.

Open the terminal window and type the following commands:

$ cd $HOME
$ nano .bash_profile

Then, at the bottom, add this segment.

alias python="python3"

Python 3.9 version can be checked using the following command.

$ python --version

Python 3.9.0

How to Update Python version on LINUX?

Users can use the below listed Linux commands to upgrade Python version on the Linux server:

ppa:deadsnakes/ppa can be added to the system’s Software Sources to upgrade the machine with unsupported packages from this untrusted PPA.

$ sudo add-apt-repository ppa:deadsnakes/ppa

This command is used to update the Python package.

$ sudo apt update
$ sudo apt install python3.9

Then, using the commands below, you can search the versions of your new and current Python installations:

This command will show you the following version of python installed in your system

$ sudo python --version

2.x.x

$ sudo python3 --version

3.8.x

$ sudo python3.9 --version

3.9.0

Conclusion

We have seen how to update Python version on operating systems like Windows, Mac OS, and Linux. Follow the guide carefully to update your python software. We believe this guide fulfills your requirement though you can install the latest version successfully. Leave your comments below for your feedback and queries.

People Are Also Reading:

  • How to Learn Python
  • How to Install Python on Windows
  • How to Install Python on Ubuntu
  • How to Check Python Version?

Keeping your Python programming language up to date is essential for taking advantage of the latest features, improvements, and security fixes. As a Python programmer, you’ll want to make sure you’re using the most recent version to ensure optimal performance and compatibility with other libraries and frameworks.

To update Python on Windows and macOS, you can download the latest version from the official Python website, run the installer, and follow the prompts. If you’re using Linux, you can add the deadsnakes PPA, update your apt cache, and install the updated Python package.

But.

And there is always a but.

Keeping your Python installation current ensures you’re leveraging the full potential of the language. In this article, we’ll go over how to update Python on Windows, macOS, and Linux. For each operating system, we’ll outline the steps that you will need to update Python to the latest version.

Let’s get into it!

How to Update Python

How to Check Your Current Python Version

Before updating Python, it’s essential to know your current version of Python. You can easily check the Python version on your computer via the command line.

How to Check Your Current Python Version

This process varies slightly depending on your operating system.

How to Check Current Python Version on Windows

To check the current Python version on Windows, you can follow the steps given below:

  1. Press Win + R, type cmd, and hit Enter to open the Command Line Interface.
  2. Type python –version and press Enter. You should see your Python version displayed as shown in the image below:

Checking Current Python Version on Windows

This command will print the current Python version onto the terminal. As you can see in the image above, I am using the Python version 3.10.2.

How to Check Python Version on Mac and Linux

To check the current Python version on Mac and Linux, you can follow the steps given below:

  1. Open the Terminal (Press Ctrl+Alt+T on Linux).
  2. Type python3 –version and press Enter to display your Python 3 version. Alternatively, you may use python3 -V.

In both Windows and Mac/Linux, the output will look something like this:

Python 3.10.2

Now that you know your current version, you can proceed with updating it if necessary.

In the next section, we’ll look at the process of updating Python to the latest version.

How to Update Python on Windows

In this section, you’ll learn how to update Python on your Windows computer using three different methods:

  1. Using the Python installer
  2. Using the Windows Microsoft Store
  3. Using Chocolatey

How to Update Python on Windows

1. Using the Python Installer

To upgrade Python on your Windows system using the Python installer, follow these steps:

  1. Visit the Python Releases for Windows section on Python’s official website to find the desired version of Python.
  2. Click the Download Python button to download the installation file for the version you want, such as Python 3.11.
  3. Run the downloaded installer. If you’re upgrading from an existing Python 3.x installation, the installer will allow you to install the newer version alongside the older one.
  4. During the installation process, ensure that the “Add Python to PATH” option is checked, so the new version is available in your system’s PATH.
  5. Finally, open a command prompt (cmd) and type py.exe to verify that Python has been updated successfully.

Once you carry out all the steps outlined above, you’ll be able to use new features that come with the latest versions.

2. Using the Windows Microsoft Store

Another option to update Python is through the Windows Microsoft Store.

Using the Windows Microsoft Store to Update Python

You can follow the steps below if you’d like to update Python using the Windows Microsoft Store:

  1. Open the Microsoft Store on your Windows system and search for “Python.”
  2. Choose the Python version you want to install, such as Python 3.11.
  3. Click Get or Install to start the installation process.
  4. Once the installation is complete, you can find Python in the Start Menu.
  5. Open a command prompt (cmd) and type py.exe to verify that the new Python version has been installed successfully.

3. Using Chocolatey to Update Python

Chocolatey is a package manager for Windows that can help you update Python with ease.

Using Chocolatey to Update Python

You can follow the steps given below to update Python using Chocolatey:

  1. Install Chocolatey on your computer if you haven’t already. To do this, launch PowerShell as an administrator and run the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((Invoke-WebRequest -Uri 'https://chocolatey.org/install.ps1' -UseBasicParsing).Content)

This Python command will install the Chocolatey package manager on your operating system.

Installing Chocolatey with PowerShell

  1. Once Chocolatey is installed, you can upgrade Python by running the following command in an elevated PowerShell window:
choco install python --pre

This will install the latest pre-release version of Python, such as Python 3.11.

Downloading and Installing Python using Chocolately

  1. To keep your Python installation up-to-date in the future, simply run:
choco upgrade python

This command will update Python to the latest Python version if you already have Python installed:

Chocolatey upgrading python in the Windows PowerShell

  1. Verify that Python has been updated by opening a command prompt (cmd) and typing py.exe.

Checking the current Python version

You can see that our old version of Python got updated to the latest version, from 3.10 to 3.11.

By following the instructions for one of these methods, your Python installation on Windows should be up-to-date and ready for you to use in your development environment.

How to Update Version of Python on MacOS

In this section, we’ll discuss two methods to update Python to the latest Python version on your MacOS: using the Python.org installer and using Homebrew.

How to Update Version of Python on MacOS

1. Using the Python Installer

To update Python using the Python.org installer, follow the steps below:

  1. Visit the Python.org website and navigate to the Downloads section.
  2. Click on the “Latest Python 3 Release” link to download the installer for the most recent version.
  3. Once the download is complete, open the installer and follow the prompts to start the installation process.
  4. Throughout the installation, ensure that you select the “Add Python to PATH” option to update your system’s PATH environment variable.

After a successful installation, check your updated version by opening a terminal and typing python3 –version. This should display the latest version.

2. Using Homebrew to Update Python

Homebrew is a popular package manager for MacOS that can simplify your Python upgrading process. Follow these steps to upgrade Python version using Homebrew:

  1. First, ensure that Homebrew is installed on your computer. If not, you can install it by following the instructions on the Homebrew website.
  2. Open a terminal window and update Homebrew by running the following command: brew update.
  3. Now, to install the latest version of Python, you can run: brew install python. This command will download and install the most recent Python version.
  4. If you have already installed Python using Homebrew, you can use the command brew upgrade python instead.

Once the installation is complete, check your updated Python version in the terminal by running python3 –version. Your system should now be running the latest version of Python.

By following either the Python.org Installer method or the Homebrew method, you can easily update your Python installation on MacOS.

How to Update Python on Linux

In this section, you’ll learn how to upgrade Python on Linux using the APT package manager.

The APT package manager is an essential tool for managing software on Ubuntu and other Debian-based distributions.

How to Update Python on Linux

To upgrade Python using the APT repository, you can follow these steps:

  1. Open a terminal window.
  2. Update the package list by running the following command:sudo apt-get update
  3. Upgrade Python by executing the following command:sudo apt-get upgrade This command will upgrade Python to the default version in your distribution’s package manager, which might be slightly behind the official release but is considered stable.
  4. Verify the installation by running the following command:python --version This will display your existing version. If it has been successfully upgraded, it will show the new version.

By following the instructions in this section, you can successfully upgrade Python on your Linux system, ensuring you have the latest features, security patches, bug fixes, and tools available for your projects.

Final Thoughts

Updating Python is an essential step in keeping your development environment safe and efficient. By doing so, you’re ensuring access to the latest features and improvements.

When you upgrade Python, you benefit from the efforts of the Python community to make the language better, more secure, and more capable.

The newer versions of Python can give you faster execution, better memory management, and access to new libraries or functions. Every update to Python empowers you to write cleaner and more efficient code.

Whether you’re using Windows, macOS, or Linux, following the right steps will ensure a smooth transition to the newer version!

Frequently Asked Questions

In this section, we’ve listed some frequently asked questions when updating Python to the latest version. Give it a look as these questions may be helpful in some of the confusion you might have.

Frequently Asked Questions

How to upgrade Python on Windows?

To upgrade Python on Windows, visit the Python official website and download the installer for the version you want to update to.

Run the installer and follow the on-screen instructions. Remember to tick the “Add Python to PATH” option during the installation.

Can I update Python using pip?

No, you can’t update Python itself using pip. Pip is a popular Python package manager; it’s used to install and manage software packages/libraries written in Python, not to upgrade the Python interpreter itself.

How to update Python with conda?

To upgrade your Python version with conda, open your terminal or command prompt and enter the following command:

conda update python

This will upgrade your Python version to the latest one available in your conda environment.

How can I switch from Python 2.7 to 3.6 on Linux?

To switch from Python 2.7 to 3.6 on Linux, you can use the following commands:

sudo apt update
sudo apt install python3.6

My Python Version is not updating, what should I do?

If your Python versions are not updating, double-check that you have installed the new version correctly and that your system PATH includes the updated version. You can also try uninstalling the old version of Python before installing the new one.

To learn more about handling errors in Python, check the following video out:

»


This article is part of in the series

Published: Friday 23rd July 2021

Last Updated: Saturday 17th December 2022

Python receives a major update once every 12 months, with bug-fix updates and security patches being released every few months. The most recent version of Python – Python 3.9 – introduces features like Union Operators in dict, the Flexible function, and Type Hinting Generics.  Updating Python can be confusing regardless of which OS you’re running. Do you remove the old version first? Or can you update the package directly? Here’s an easy tutorial on how to update Python.

How to Update Python in Linux, Mac, or Windows

It is possible to install two major versions of Python – say, Python 2.x and Python 3.x – on one computer and use both. If you want to move from Python 2.x to 3.x, you don’t have to uninstall the previous version unless you don’t want to use it anymore. Furthermore, Python 3 now comes with the “py.exe” launcher integrated by default. The launcher helps users in two ways: 

  1. Users can run Python from any shell using the command “py.” Typing “python” is no longer required.
  2. Allows you to use two different versions of Python 3 at the same time. You can specify which version of Python you want to use to run code with simple switches in commands (like “py -3.6”).

In other words, you won’t need to change the PATH variable every time you want to use another version of Python. But the launcher only comes installed on the Windows version of Python 3. Updating Python in computers with Linux or macOS can be more complicated.

Note: If you’ve not installed Python on your computer yet, you cannot update to a newer version. If you’re having trouble installing Python on your computer, reading our Python installation guide will help.

Updating Python in Linux

Before you run any commands, you can save yourself a lot of effort by checking whether the Linux installation comes with the latest version of Python installed. To check what version of Python 3 your machine has, open the Terminal by pressing Ctrl+Alt +T, and type in the following command:             python3 –version Or alternatively:             python3 -V The output should look something like this: command python3 -V on terminal to check python version If you see that your machine doesn’t have Python 3.9, you must run the following commands:              sudo apt update              sudo apt install software-properties-common These commands will install the Python packages required to install the newest Python version. You can now install the latest version of Python in two ways: using Apt and using the source code. Using Apt to update Python is faster and easier. Here’s how you do it:

Updating Python Using Apt-Get

Using the Apt package manager is the easiest method of installing Python 3.9 on Linux. First, you must configure the deadsnakes PPA to your machine by running the following command:             sudo add-apt-repository ppa:deadsnakes/ppa  You can now update the apt cache and install the Python 3.9 package:             sudo apt update              sudo apt install python3.9 The Python update will install. However, by default, Python will point to the previously installed version of Python 3.  After installation completes, you must update Python 3 to point to Python 3.9. Enter this command to configure Python 3:             sudo update-alternatives —config python3 A list of options will appear, and you will be prompted to pick which version of Python you want Python 3 to point to. The prompt should look like this: command to configure Python 3: sudo update-alternatives --config python3 All you have to do is type the right selection number, and you will have updated Python to the newest version on your Linux machine. To verify the version of Python being used, you can run:             python3 —V

Updating Python in Mac

Updating Python on a machine with macOS is a lot easier than updating it on a Linux machine. A Mac can have more than one version of Python installed. Therefore, you can update Python by visiting https://www.python.org/downloads/mac-osx/, downloading the installer, and running it. If you have Homebrew installed on your Mac, you can run the following command on the Terminal:             brew install python After the process completes, your computer will have the latest version of Python 3. You can verify this by running the command:             python3 —version If you want to upgrade pip and add a new library to it, you can enter the following command:             pip3 install <PROJECT NAME>

Updating Python in Windows

Updating to a new Python version is easy on a computer running Windows. All you have to do is visit the Python downloads page and download the latest version. If you’re updating to a new patch of Python (3.x.a to 3.x.b), when you run the installer, it will prompt you to “Upgrade Now.” The installer will look like this: Upgrade to Python 3.7.4 prompt window Clicking on the button will replace the existing version of Python with the new version. The older version will be removed from your computer. After you restart the computer, the new patch will be installed on your machine. In contrast, if you’re updating Python to a new minor version (3.x to 3.y), you will see the “Install Now” prompt instead of the “Upgrade Now” prompt on the installer. Clicking the button will install the new version of Python. However, the old version will not be removed. Your computer can have more than one Python version installed. The py launcher is installed automatically regardless of the version of Python you’re using. It will enable you to select the version of Python you want to use.  Running a program with a specific version is as simple as using the “py” command and entering the version you want to use, like so:             py -3.8 or              py -3.9 Suppose there are many projects on your machine that use the previous version of Python, and you use them all in a virtual environment. In that case, you can update Python just in that environment using the following command:             python -m venv —upgrade <VIRTUAL ENVIRONMENT PATH HERE>

Conclusion

Every version of Python, including the newest release, has some limitations. However, updating to the latest version of Python allows you to use all the new features. Furthermore, updated versions also come with bug fixes and improved security measures. With this guide handy, you should be able to get your hands on the newest Python version in a matter of minutes. Going through our Python usage guide next will help you quickly pick up all that you can do with Python.

  1. Home
  2. Python Tips and Tricks
  3. Python Library Tutorials
  4. Python How To’s
  5. Python Tutorials

Installing/Upgrading Python Using the Chocolatey Windows Package Manager

Let’s say you have Python 2.7.16:

C:\Windows\system32>python --version
python2 2.7.16

…and you want to upgrade to the (now current) 3.x.y version. There is a simple way to install a parallel installation of Python 3.x.y using a Windows package management tool.

Now that modern Windows has package management, just like Debian Linux distributions have apt-get, and RedHat has dnf: we can put it to work for us! It’s called Chocolatey.

What’s Chocolatey?

Chocolatey is a scriptable, command line tool that is based on .NET 4.0 and the nuget package manager baked into Visual Studio.

If you want to learn about Chocolatey and why to use it, which some here reading this might find particularly useful, go to https://chocolatey.org/docs/why

Installing Chocolatey

To get the Chocolatey Package Manager, you follow a process that is described at https://chocolatey.org/docs/installation#installing-chocolatey,

I’ll summarize it for you here. There are basically two options: using the cmd prompt, or using the PowerShell prompt.

CMD Prompt Chocolatey Installation

Launch an administrative command prompt. On Windows 10, to do this:

  • Windows + R
  • Type cmd
  • Press Ctrl + ⇧ Shift + ↵ Return

If you don’t have administrator rights on the system, go to the Chocolatey website. You may not be completely out of luck and can perform a limited local install, but I won’t cover that here.

  • Copy the string below into your command prompt and type Enter:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Chocolatey will be downloaded and installed for you as below:

Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
Downloading 7-Zip commandline tool prior to extraction.
Extracting C:\Users\blahblahblah\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\blahblahblah\AppData\Local\Temp\chocolatey\chocInstall...
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
  upgrading from a version of Chocolatey less than 0.9.9.
  'Batch file could not be found' is also safe to ignore.
  'The system cannot find the file specified' - also safe.
chocolatey.nupkg file not installed in lib.
 Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
WARNING: Not setting tab completion: Profile file does not exist at 'C:\Users\blahblahblah\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

Either Exit the CMD prompt or type the following command to reload the environment variables:

refreshenv

PowerShell Chocolatey Installation

If you prefer PowerShell to the cmd prompt, you can do this directly from there, however you will have to tell PowerShell to run with a proper script execution policy to get it to work. On Windows 10, the simplest way I have found to do this is to type the following into the Cortana search bar next to the Windows button:

PowerShell.exe

Next, right click on the ‘Best Match’ choice in the menu that pops up and select ‘Run as Administrator’

Now that you’re in PowerShell, hopefully running with Administrator privileges, execute the following to install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

PowerShell will download Chocolatey for you and launch the installation. It only takes a few moments. It looks exactly like the CMD installation, save perhaps some fancy colored text.

Either Exit PowerShell or type the following command to reload the environment variables:

refreshenv

Upgrading Python

The choco command is the same whether you use PowerShell or the cmd prompt. Launch your favorite using the instructions as above. I’ll use the administrator cmd prompt:

C:\WINDOWS\system32>choco upgrade python -y

Essentially, chocolatey will tell you «Hey, Python isn’t installed» since you’re coming from 2.7.x and it treats the 2.7 version as completely separate. It is only going to give you the most current version, 3.x.y (as of this writing, 3.7.2, but that will change in a few months):

Chocolatey v0.10.11
Upgrading the following packages:
python
By upgrading you accept licenses for the packages.
python is not installed. Installing...

python3 v3.x.y [Approved]
python3 package files upgrade completed. Performing other installation steps.
Installing 64-bit python3...
python3 has been installed.
Installed to: 'C:\Python37' 
  python3 can be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The upgrade of python3 was successful.
  Software installed as 'exe', install location is likely default.

python v3.x.y [Approved]
python package files upgrade completed. Performing other installation steps.
 The upgrade of python was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.

Chocolatey upgraded 2/2 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Either exit out of the cmd/Powershell prompt and re-enter it, or use refreshenv then type py —version

C:\Windows\System32>refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..

C:\Windows\system32>py --version
Python 3.7.2

Note that the most recent Python install will now take over when you type Python at the command line. You can run either version by using the following commands:

py -2
Python 2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

C:\>py -3
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>exit()
C:\>

From here I suggest you use the Python pip utility to install whatever packages you need. For example, let’s say you wanted to install Flask. The commands below first upgrade pip, then install Flask

C:\>py -3 -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 1.6MB/s
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-19.0.3

c:\>py -3 -m pip install Flask

…will do the trick. Happy Pythoning!

  • How to update openssl windows
  • How to update java on windows
  • How to update git on windows
  • How to update drivers windows update
  • How to uninstall windows defender