The Wayback Machine - https://web.archive.org/web/20240702155726/https://www.geeksforgeeks.org/how-to-upgrade-pip-and-python-on-windows-linux-and-macos/
Open In App

How to Upgrade Pip and Python on Windows, Linux, and MacOS?

Last Updated : 29 Nov, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

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.

Pip-Upgrade on Windows-Linux-Mac

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 Python version in Linux

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

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 Python and Pip in Ubuntu

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

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

Upgrading Pip in Windows

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

Download page of Python

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

Python 3 version

Now, run the following commands one by one to update Pip and Python:

pip3 install --upgrade pip

Pip3 Install

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.

FAQs on Pip & Python Upgrade

1. What is the full form of Pip?

As mentioned earlier, “Pip” stands for “Pip Installed Packages.”

2. Are Pip and Python the same?

Pip is the Python package manager used to install different modules of the Python package. 

3. Difference between Pip and import in Python

Pip is the utility to install the modules, but the import command is used for importing the modules in the system. For instance, you can use Pip from the terminal, whereas import is used in the Python modules or scripts. 



Similar Reads

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 files are stored in a large “online reposit
3 min read
GeeksforGeeks Upgrade Campaign - Live, Learn and Upgrade!
"You Live, You Learn, and You Upgrade" - one of the most practical and impactful saying! Indeed, the concept of Upgrading is something very crucial in life - be it any goal, you must opt to upgrade yourself and do better consistently to get closer to success. You need to understand that if you keep doing what you've always done then subsequently yo
4 min read
How to install pip in macOS ?
Before we start with how to install pip for Python on macOS, let's first go through the basic introduction to Python. Python is a widely-used general-purpose, high-level programming language. Python is a programming language that lets you work quickly and integrate systems more efficiently. PIP is a package management system used to install and man
2 min read
Linux - Installing PIP to Manage Python Packages
Python is the most popular language for a decade, and we all know that python had a huge support of libraries that are used in different sectors of Software Engineering. Meanwhile, PIP also getting its fame along with python in Linux and developers community.PIP is a package manager for python in handling the software packages that are developed us
2 min read
How to Install PIP on Windows ?
PIP is a package management system used to install and manage software packages/libraries written in Python. PIP stands for Preferred Installer Program or Pip Installs Packages. We can install Python packages using the Python pip install command in Command Prompt. Pip Install a Python Package These files are stored in a large "online repository" te
6 min read
How to Install GIT on Windows, MacOS and Linux?
Are you going to create your free Git account, the most loved platform of all developers worldwide? Whether you're moving into the coding universe on Windows, download Git for macOS, or Linux, Installing Git in a trouble-free manner is important. This article will guide you through how to download Git for Windows, macOS, and Linux to join the world
6 min read
Difference Between pip and easy_install in Python
Python's popularity is partly due to its many pre-written code packages that simplify development. Two major tools for managing these packages are pip and easy_install. In this article, we'll look at how they're alike and different, so you can choose the best one for our projects. Python PipPip, the short form of "Pip Installs Packages," is like th
3 min read
How to install Python libraries without using the pip command?
The most common practice of installing external libraries in your system is by using the Python pip command. However, there is an alternate method of manually installing Python libraries without using the pip command. In this article, we are going to discuss how to manually install a python package. Below is the Step-by-step approach to manually in
1 min read
11 pip Commands For Python Developers
Python has been preferred over all programming languages for technological advancement. It is one of the most lucrative programming languages that is used as the main programming language by more than 80%of developers. It is used for web development, mobile applications, hardware programming, and many more. Pip commands cannot be ignored when we ta
5 min read
Install Packages Using PIP With requirements.txt File in Python
Installing more than one package in Python simultaneously is a common requirement for any user migrating between operating systems. Most users are unaware of the availability of batch installing all the packages. They default to manually installing each library one after the other, which is time-consuming. This article will teach you how to install
2 min read
Article Tags :
Practice Tags :
three90RightbarBannerImg