Upgrade PIP Package on

How to Upgrade PIP Packages on Windows, Linux, and Mac

Today we will learn How to Upgrade PIP Packages. Pip is a great tool for installing and managing Python packages; It is a package manager that allows installing third-party software packages for Python. It is one of the most powerful package managers in Python and has become quite popular because it is quite easy to use. Although most Python versions come pre-loaded with it, this guide will teach you how to manually install pip, review its version, and use some common pip commands. It is a pre-installed package with Python for update or package version only. It plays no role in the installation or uninstallation of Python.

What is Python?

Python is an open source programming language that allows software development and is even a great choice for web development. Also, one can use Python on a number of popular operating systems including Windows, Linux, and iOS.

How to upgrade pip on Windows/Linux?

To take advantage of new features and security patches, update Pip from time to time like any other software. Although pip can update itself automatically, you need to know how to manually update pip on Windows and Linux VPS. Follow the steps below to update Pip.

Step 1: Simply open Command Prompt on Linux Windows system or Terminal.

For Windows: First, type Windows+R and type CMD and enter, or you can open the Windows search box, then type command prompt and enter button.

For Mac: Press Command + Space key, type terminal, and press Enter button.

For Linux: Log in to ssh with putty or another terminal software.

Step 2: Run the following command:

python -m pip install --upgrade pip

It will uninstall the current version of pip on the system and replace it with the latest version.

How to downgrade pip?

If there is a need to revert to a previous version of pip due to compatibility issues, this can easily be done from the command prompt. Open a command prompt and type the following command to downgrade to a custom version of pip (specify the version of pip).

python -m pip install pip==18.0 (or any other version)

Pip will be downgraded to the specified version. After executing the above command, one can check the pip version with this command: pip3 –version.

How to install python packages with pip?

With pip, we can install any new packages for our Python environment. To set up a new third-party package using pip, we can use the pip install <package name> command. And pip will install new packages from the PyPI repository. Suppose you want to install NumPy for your Python environment, you can run the following pip install command.

$ pip3 install numpy

Or

$ pip install numpy

How to update python packages with pip?

After installing the package, later, if we want to update the package to the latest version. For this, we can take the help of pip command. With pip3 install –upgrade <package name> command we can upgrade the installed Python package to the latest available version.

For example, suppose we want to upgrade the installed NumPy package to its latest version.

$ pip3 install --upgrade numpy

Or

$ pip install --upgrade numpy

How to uninstall python packages with pip?

We can uninstall an installed Python package using the pip command. The pip command makes it very easy for the developer to manage third-party packages. If for some reason, you don’t want a particular package for your Python environment, you can use the following pip command to uninstall the package.

pip3 uninstall <package_name>

Let’s say you no longer need the installed NumPy package and want to uninstall it. For this, you can run the following command in your terminal or command prompt.

pip3 uninstall numpy

Or

pip uninstall <package_name>

How to Install PIP [Step-by-Step Guide for Upgrading PIP Package]

Here are some simple steps that guide you to install pip on the system:

Step 1: Install Python and Pip

To install pip for your system, you must first install Python3. And to install Python, you can visit Python’s official website (recommended for Windows and Mac). If you’re on Windows and Mac, with the latest installation of Python, pip will also come pre-installed. If you are a Linux user, you can install the latest version of Python and pip only from Terminal without installing from Python’s official site.

Install Linux Python and pip (with sudo access)

$ sudo apt update

$sudo apt install python3 python3-pip

The two commands above will install Python for your Linux system.

Step 2: Check the pip version and verify the installation

To check that pip is installed correctly, run the following command at the command prompt (for Windows) or in the Terminal (for Linux and MacOS):

pip3 --version

Or

pip --version

You’ll get an output similar to the one shown below:

pip18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-package\pip (python 3.7)

Step 3: Managing Python packages with pipes

Once installed and configured on the system, use pip to manage functionality. To get a quick overview of the functions and syntax available for pip, open a command prompt and type:

pip3 help

Or

pip help

If you already have an older version of Python installed on your operating system, you can refer to our blog on how to update Python for an in-depth understanding of how to install pip on Windows/Linux, this blog post will help you.

Conclusion

We hope we have successfully understood how to install pip on your system. If you work with Python development, pip can be useful for managing Python library packages. Also, you can easily choose a pip version you want to work with.

Scroll to Top