How to Upgrade Pip and Python on Windows, Linux, and MacOS?
Last Updated :
29 Nov, 2023
Python is a programming language with standard libraries and a great ecosystem of third-party packages. On the other side, Pip is the default package manager for Python that installs, upgrades and manages Python, including its dependencies. Pip simplifies the process of installing external libraries and tools which are written in Python. Pip allows developers to add functionalities to their Python projects. It can be easier for you to install and handle Python packages with Pip.

That’s why installing and updating Pip is essential to maintain the functionalities of Python. So if you also want to know the simple methods to update Pip and Python, don’t worry. This tutorial has everything you need to know about ways to update Pip and Python in Linux, Windows, and Mac.
How to Update Pip and Python?
“Pip” stands for “Pip Installed Packages,” which installs Python packages. These packages are the collection of modules, resources, and libraries created by the Python community. The process of upgrading Pip and Python is similar in Linux, Mac, and Windows, so let’s take a look at them:
A. How to Update and Upgrade Python in Linux?
Updating and Upgrading Python on Debian/Ubuntu-based Systems:
Update the Package List:
Start by updating the package list to ensure you have the latest information on available packages:
sudo apt update
Upgrade Python:
To upgrade Python, use the apt
package manager. You can specify the Python version you want to upgrade to, such as Python 3.10:
sudo apt install python3.10
Replace `python3.10`
with your desired Python version.
Verify the Upgraded Python Version:
After the installation is complete, verify the upgraded Python version:
python3 --version
Updating and Upgrading Python on Red Hat/Fedora-based Systems:
Update the Package List:
Begin by updating the package list using the dnf
package manager:
sudo dnf update
Upgrade Python:
To upgrade Python, you can use the dnf
package manager. Specify the Python version you want to install, such as Python 3.10:
sudo dnf install python3.10
Replace python310
with your desired Python version.
Verify the Upgraded Python Version:
After the installation is complete, verify the upgraded Python version:
python3 --version
B. How to Update and Upgrade Pip in Linux?
To update and upgrade Pip on a Linux system, you can use the `pip`
tool itself to update to the latest version. Follow these steps:

Checking the version of Python and Pip in Ubuntu
If Python and Pip are not available in your system, you can install them by running the following commands:
For Ubuntu:
sudo apt install python3
sudo apt install python3-pip
For Fedora:
sudo dnf install python3
sudo dnf install python3-pip
For CentOS:
sudo yum install python3
sudo yum install python3-pip

Installing Python Pip in Ubuntu
After installing Pip and Python, you will automatically get their latest version. However, if you want to upgrade the Pip and Python manually, then please run the following commands one by one:
sudo apt upgrade python3
sudo apt upgrade python3-pip

Upgrading Pip and Python in Ubuntu
B. How to Update Pip and Python in Windows?
Before going to the updating process of Pip and Python in Windows, we recommend you check the currently installed version of Python and Pip from the Command Prompt:
Python --version

Checking Python Version in Windows
Note: Before running any command, please run the Command Prompt as an administrator.
In case your system needs to provide a clear result about Python’s version, then you can follow our guides to install Python and Pip on Windows. Now, please run the following command in the command prompt:
python -m pip install --upgrade pip

Upgrading Pip in Windows
For upgrading Python, please visit the official website of Python and download its latest version.

Download page of Python
After downloading the setup, please install it in your system and check its version from the Command Prompt.
C. How to Update Pip and Python On Mac?
Updating Pip and Python on Mac is almost similar to Windows, so first open the terminal and check the current version of Python and Pip:
pip3 --version
Or
python3 --version

Now, run the following commands one by one to update Pip and Python:
pip3 install --upgrade pip

Also, Read
Conclusion
So this was all about the commands you can use to upgrade Pip and Python in Linux and Windows. Upgrading the utilities provide new features and removes the bugs from the current one. By keeping your Pip and Python installations up-to-date, you gain access to the latest features, bug fixes and increase the efficiency of your project. Also, the latest version of Pip and Python will provide compatibility with the latest libraries and frameworks. You can visit the official website and download the Python package for your Linux system. It will help you verify and install the latest version of Python and Pip without hassles.
Similar Reads
How to check Python Version : Windows, Linux and Mac
Python has multiple versions, and it's important to know which version is installed on your system. This information is crucial because different Python versions may have variations in syntax or libraries, and ensuring you're using the correct version is vital for compatibility with your projects. I
5 min read
How to Install Python py-asn module on Windows?
Py-asn is a Python module that is said to be an extension module. It provides\Enables a fast IP address to Autonomous System Numbers Lookups. It can perform both Current state and Historical state lookups with help from its contained packages. Input can be given as MRT/RIB BGP archive. The module is
2 min read
How to Upgrade PIP on Windows
In this tutorial, we will see how to Upgrade PIP on Windows. We will cover how to upgrade, check the version, and also how to downgrade PIP to the previous version. What does pip () do?PIP is a package management system used to install and manage software packages/libraries written in Python. These
5 min read
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. Here, we will see how to upgrade the Python version. Upgrading Python on WindowsTo check the current version of Python on your system, use
4 min read
How to download and install Python Latest Version on Windows
Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python latest version on Windows Operating System. Since windows don't come with Python preinstalled, it needs to be installed explicitly. In window
2 min read
How to install Python on Windows?
Python is a high-level programming language that has become increasingly popular due to its simplicity, versatility, and extensive range of applications. The process of How to install Python in Windows, operating system is relatively easy and involves a few uncomplicated steps. This article aims to
5 min read
How to install Python3 and PIP on Godaddy Server?
GoDaddy VPS is a shared server that provides computational services, databases, storage space, automated weekly backups, 99% uptime, and much more. Itâs a cheaper alternative to some other popular cloud-based services such as AWS, GPC, and Azure. Python is an open-source, cross-platform, high-level,
2 min read
Upgrading from Python2 to Python3 on MacOS
Python is a high level and general-purpose programming language. It is widely used in a variety of fields such that it fulfills the need of developers who are in the front end, backend, or both. It is being used rigorously in Machine Learning, Artificial Intelligence, Web Development, and in various
4 min read
How to Install OpenCV for Python on Windows?
Prerequisite: Python Language Introduction  OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems. By using it, one can process images and videos to identify
4 min read
How to Install py2exe for Python on Windows?
Py2exe is a Python package that allows the building of standalone Windows executable programs that can be 32-bit or 64-bit from Python scripts. This package has only support to Windows operating system. It can build console executable and windows (GUI) executable. So, in this article, we will be ins
2 min read