English
+370 5 205 5502 sales@monovm.com

How to Upgrade PIP Package to Latest Version [Update PIP]

Are you looking to upgrade PIP package in Windows, Linux, and Mac operating systems to its the latest version, then you are at the correct blog to start with your journey.

14 Dec, 21 by Antoniy Yushkevych 5 min Read

List of content you will read in this article:

Pip is a great tool for installing and managing Python packages, it is a package manager that allows the installation of third-party software packages for Python, it is among the most powerful package managers for Python and has become quite popular because it is quite easy to use. Even though most Python versions come pre-loaded with it, this guide will teach to manually install pip, review its version, and use some simple pip commands. it is a preinstall package that comes with python to only update python or package versions. it does not play any role in the installation or uninstallation of Python.

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

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

Step 1: Install Python and pip

To install pip for your system, you first need to install Python3. And to install Python, you can visit the official website of Python(recommended for windows and mac). If you are on windows and mac, with the latest installation of Python, pip will also get pre-installed. 

If you are a Linux user, you can install the latest version of Python and pip from the terminal only rather than installing Python from its official site. 

Linux installs Python and pip (with sudo access).

$ sudo apt update

$sudo apt install python3 python3-pip

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

Step 2: Check the pip Version and Verify the Installation

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

pip3 --version

Or 

pip --version

You will 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 pip

Use pip to handle functionalities once it's installed and configured in the system. 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 have an older version of Python already installed, find out how to update Python.

To take advantage of the new features and security patches, update pip from time to time, just like any other software. While pip can automatically update itself, it’s important for you to know how you can manually update pip.

Simply open Command Prompt on Windows system and execute the following command:

python -m pip install --upgrade pip

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

If there is a  need to revert to a previous version of pip due to compatibility issues, one can easily do it 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 the execution of the above command, one can check the pip version with this command: pip3 --version

With pip, we can install any new package for our Python environment. To install a new third-party package using pip, we can use the pip install <package name> command. And pip will install the new packages from the PyPI repository.

Let’s say if you want to install numpy for your Python environment, you can run the following pip install command.

$ pip3 install numpy

Or

$ pip install numpy

After installing the package, later if we wish to update the package to the latest version. For that also 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, let’s say we want to upgrade the installed numpy package to its latest version.

$ pip3 install --upgrade numpy

Or 

$ pip install --upgrade numpy

We can also uninstall an installed python package using the pip command. The pip command makes it very easy for the developer to manage the third party packages. For some reason, if you do not want a specific package for your Python environment, there you can use the following pip command to uninstall the package.

pip3 uninstall <package_name>

Let’s say now you do not need the installed numpy package and wish to uninstall it. For that, you can run the following command on your terminal or command prompt.

pip3 uninstall numpy

Or 

pip uninstall <package_name>

We hope we have successfully made you understand how to install pip on your system. If you are working with Python development, pip can come in handy for managing various python library packages. Also, you can easily choose a pip version that you want to work with.

People Are Also Reading:

Antoniy Yushkevych

Master of word when it comes to technology, internet and privacy. I'm also your usual guy that always aims for the best result and takes a skateboard to work. If you need me, you will find me at the office's Counter-Strike championships on Fridays or at a.yushkevych@monovm.com