How to update Python in Windows, Mac, and Linux

As you all know, Python is the new trend in the world of computer programming. Working with the updated versions of python is more fun because it has more enhanced features for advanced programming. Let’s get to know that how to update python in Windows, Mac, and Linux, if you are already working with Python and want an upgraded version

Requirement for Updating Python

There are two basic conditions for updating python in your operating system.

  • If you have to switch between two major versions of python i.e. version 2 or version 3 then they will be installed in different directories on your PC.
  • If you have to switch between two minor versions i.e. the latest version of series 2 or the latest version of series 3, just install them one over the other.
  • Download the latest version from their website and run it on your PC. The files of the previous version will be removed and python is updated automatically.

You can choose the desired version after installation using the following command 

py – (your required version)

How to update Python in Windows 10

Python can be updated in Windows in multiple ways. Let’s discuss all of them below.

Video tutorial for windows 7, 8, 10.

Video tutorial for mac.

Using python windows installer

Let’s get to know about the way to update python using the python windows installer.

image - How to update Python in Windows, Mac, and Linux
  • Go to Downloads and click View the full list of downloads
image 1 - How to update Python in Windows, Mac, and Linux
  • Select your desired version.
image 2 - How to update Python in Windows, Mac, and Linux
  • Select the installer according to your system’s processor i.e. 32-bit or 64-bit.
image 32 - How to update Python in Windows, Mac, and Linux
  • Click to open this executable file.
image 3 - How to update Python in Windows, Mac, and Linux
  • Select both given options before installation.
  • Select Customize Installation to customize the settings.
image 5 - How to update Python in Windows, Mac, and Linux
  • Select your desired Optional Features and click NEXT.
image 43 - How to update Python in Windows, Mac, and Linux
  • Select your desired Advanced Features. Then click Browse to select the required path to save it on your PC. Then click Install.
image 6 - How to update Python in Windows, Mac, and Linux
  • The installation process will start. 
image 37 - How to update Python in Windows, Mac, and Linux
  • After installation, the python is set up on your PC. Click CLOSE to end the process.
image 7 - How to update Python in Windows, Mac, and Linux
  • Open a command prompt and use the following command to check the version of python on your PC.

py — version

Using Chocolatey Software

Chocolatey is a software for Windows that automates the installation of any software for you. It wraps installers, executables, zips, and scripts into compiled packages. 

First of all, install the chocolatey software from www.chocholatey.org according to the given commands. Then follow the given steps to update python in windows.

  • Open Windows Power Shell or Command Prompt. Write choco list python.
image 8 - How to update Python in Windows, Mac, and Linux
  • All the packages of python will be listed below.- How to update Python in Windows, Mac, and Linux
  • If your system has 64-bit windows then the latest version will be installed on it. Otherwise, if it is a 32-bit system, the latest version starting with the python-x86_32 command will be installed.
image 10 - How to update Python in Windows, Mac, and Linux
  • Beware of installing any package having a Possibly broken flag in front of it.
image 14 - How to update Python in Windows, Mac, and Linux
  • Now write choco install python. The most recent version of python will get installed on your system.
image 9 - How to update Python in Windows, Mac, and Linux
  • If your want to install python 2 then give the command choco install python2 and the latest version of python 2 will be updated on your system.
  • If you are asked to run any script then write A so that all the next scripts will run automatically.
image 12 - How to update Python in Windows, Mac, and Linux
  • The latest version has been updated on your PC.
image 11 - How to update Python in Windows, Mac, and Linux
  • Now restart the PowerShell and give the following command to check the version installed on your PC.

python -V

How to update Python in MAC

There are two ways to update python on MAC. Both are explained in detail below.

Using Python Installer

The process to upgrade to python’s latest version using python installer is as follows:

  • Go to Downloads and click View the full list of downloads

cEvXB9fe2 18o3 cEATh2H9aUlFpWFZeOL2POnSNaVD41 uQejOHlHCBU3F3BuMJI0tBgi95aqrr1bsJGyIckjatNe325p99dMTTYU3O6SDMORU4hMBZ dGUlA5FEkoH0YlXINM=s0 - How to update Python in Windows, Mac, and Linux

  • Select your desired version.
image 16 - How to update Python in Windows, Mac, and Linux
  • Select the MAC installer.
image 39 - How to update Python in Windows, Mac, and Linux
  • Select the downloaded file.
image 21 - How to update Python in Windows, Mac, and Linux
  • Open the downloaded file.
image 34 - How to update Python in Windows, Mac, and Linux
  • The installer is opened. Read the introduction and click CONTINUE.yp0AbxOkQcFZzLsVExGkn8TO q - How to update Python in Windows, Mac, and Linux
  • Read the important information about python and click CONTINUE.
image 13 - How to update Python in Windows, Mac, and Linux
  • Read the history and license and click CONTINUE.
image 15 - How to update Python in Windows, Mac, and Linux
  • Click AGREE to accept the terms and conditions and continue the installation.BUGL0CfRKc2v7v EJq7zotIZnWyeZWF8o25toJvJAkgutaZKDtvSpEgYf8bgOYECQ1JvleS1FsSZS9n9cHFZvoK2b6p63LBj cW8zw4DXBoj7qiCM6nSkw4W9 JgzN86BB11UpM=s0 - How to update Python in Windows, Mac, and Linux
  • Select a destination to save the file and click CONTINUE.
image 17 - How to update Python in Windows, Mac, and Linux
  • Click INSTALL to start the installation of the upgraded version.ZG5VS9KiyYp4 afRKWHXZKxX2QgL5GUZLrRyX2LXMyAQCNJODQzaXiPhqEhNMgOcfMaNKyZNojqKDxniudh2HNLWofDtOr5onO6ORq Ectt7I3sK 27kL8Xndk7jbqD0sDLqH4E=s0 - How to update Python in Windows, Mac, and Linux
  • Enter the password to confirm.
image 18 - How to update Python in Windows, Mac, and Linux
  • Installation is getting prepared.RfQjG8 nlq8PN7TxIUrzloKPIge4lLUE9Wzp8jiYfXGv3etqTfxdiLi EAOmaMxL4FZ3OJF8tmSN9M - How to update Python in Windows, Mac, and Linux
  • Finally, the upgraded version is installed.
image 19 - How to update Python in Windows, Mac, and Linux

To check that the latest version is successfully installed on your MAC or not, open the terminal on your PC and write the given command and you will get the version of python which is recently installed on your PC.

python –version

Using Homebrew

Homebrew is a software package management system that helps in the installation of software on macOS. To upgrade python by using homebrew, you first have to install the homebrew software on your MAC from the website https://brew.sh/ according to the given commands. Now you can proceed to upgrade python using homebrew.

  • Open Terminal on your MAC.
  • Write a command brew doctor to check if everything is working right in homebrew software and then we can proceed.
image 20 - How to update Python in Windows, Mac, and Linux
  • Now if you want to upgrade to the latest version of python 3 then write brew search python3 otherwise, if you want to upgrade the latest version of python 2 then write a command brew search python2.
image 22 - How to update Python in Windows, Mac, and Linux
  • After the searching process, now write brew install python3 for the latest version of python 3 otherwise write brew install python2 for the latest version of python 2.
image 31 - How to update Python in Windows, Mac, and Linux
  • Hence the latest version of python 2 or 3 is upgraded on your MAC. You can check it by writing the following command on the terminal.

python –version

How to update python on Linux

Linux is a large family of Unix operating systems. The way to update python in each of them is different. We will discuss the pattern to update python in some of the very famous Linux systems here. 

Updating python in Kali Linux

To update python in Kali Linux, you have to follow the following steps.

  • Go to Downloads and click View the full list of downloads
image 38 - How to update Python in Windows, Mac, and Linux
  • Select your desired version and click Download.
image 40 - How to update Python in Windows, Mac, and Linux
  • The file will be downloaded as a zipped file in the Downloads folder of your system.
8zkWpgfiBcdofun9badPwpt2qpGqkfKpPK DnGrVS1RGjiTAHnbKGXpL8difzEcis2qeCJ4B6qqrDMSdRhziKcbXzkp un5PWgCCxmsC s929otR 67YnlAonKK snDUjVuiC5c=s0 - How to update Python in Windows, Mac, and Linux
image 41 - How to update Python in Windows, Mac, and Linux
  • Extract the file in the same folder.
image 25 - How to update Python in Windows, Mac, and Linux
image 23 - How to update Python in Windows, Mac, and Linux
  • Run the given command to update your terminal.

apt-get update

  • Now, run the following commands one by one.

cd Downloads

image 42 - How to update Python in Windows, Mac, and Linux

cd Python-3.9.1

image 36 - How to update Python in Windows, Mac, and Linux

./configure

image 24 - How to update Python in Windows, Mac, and Linux

./configure –enable-optimizations

image 35 - How to update Python in Windows, Mac, and Linux

make

image 26 - How to update Python in Windows, Mac, and Linux

make install

image 28 - How to update Python in Windows, Mac, and Linux
  • Now, your latest version of python is installed on your system.
  • You can check it by the given command.

python –version

Updating python in Ubuntu using PPA

PPA is the abbreviation for Personal Package Archives. These are the software repositories designed for Ubuntu users to help them download different third-party software easily. To update python in Ubuntu by using PPA you have to follow the following commands.

  • Open terminal.
  • Run the given commands step by step.

sudo apt install software-properties-common

image 30 - How to update Python in Windows, Mac, and Linux

Write Y when asked for any permission.

image 44 - How to update Python in Windows, Mac, and Linux

sudo add-apt-repository ppa:deadsnakes/ppa

image 27 - How to update Python in Windows, Mac, and Linux

sudo apt update

image 29 - How to update Python in Windows, Mac, and Linux

sudo apt install python 3.9

image 33 - How to update Python in Windows, Mac, and Linux
  • Now, your latest version of python is installed for Ubuntu.
  • You can check it by the given command.

python –version

Wrap Up

Wrapping it up, the different ways to update the python to your desired latest version in Windows, MAC, and Linux systems are explained above in detail. These procedures will surely work for your need. Hope you will find these ways helpful. Don’t forget to share your precious thoughts with us.

Scroll to Top