Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
In Linux and Windows Last updated: November 22, 2022
Share on:
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

pip (or its recursive acronym “Pip Installs Packages”) is the package installer for Python.

Python has an extensive index of available modules and packages that you can use in your projects. Often, downloading them or keeping them updated is a challenge, especially if your project is huge or needs to maintain multiple such projects.

That’s where pip comes in. It can install packages from Python Package Index (PyPI) and other supported indexes listing Python packages.

In this article, we’ll cover installing pip on CentOS, Ubuntu, and Windows.

Installing pip

pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from or if you are working in a Virtual Environment created by virtualenv or venv. You may refer to my previous article about installing Python 3. Make sure to upgrade pip, though.

Use the below command to check whether pip is installed:


$ python -m pip --version


C:\>py -m pip --version

Using Repositories


On CentOS, we can use yum to install pip if it is not pre-installed on the system. First, we need to enable epel-release repository as:

$ sudo yum install epel-release

Then run yum update to update your packages.

$ sudo yum –y update

Once completes, install pip using yum as:

$ sudo yum install python-pip


On Ubuntu, if pip is not pre-installed on your system, you can install it using an apt tool as:

$ sudo apt install python-pip

Or for Python 3 as:

$ sudo apt install python3-pip


pip comes packaged with Python setup on Windows. If you need to install it separately, follow the next section, which works on all platforms.

Install with

Warning: Be cautious if you are using a Python install managed by your operating system or another package manager. does not coordinate with those tools and may leave your system in an inconsistent state.

To install pip using script, first securely download the script using curl or wget or your favorite download manager as:

curl -o

Then execute from the downloaded directory as to install pip:


$ python



Upgrade pip

If required, you can upgrade your pip version using the following commands:


$ python -m pip install -U pip


C:\>py -m pip install -U pip

Downgrade pip

There may be circumstances that you may need to downgrade your pip version to a specific version; you can always do that using:


$ python -m pip install pip==18.1


C:\>py -m pip install pip==18.1

Using pip

Once pip is installed on your system, you can search and install any available Python modules.

To search for any package use:

$ pip search QUERY

For example, if you want to search for NumPy package, use:

$ pip search numpy

To install the NumPy package, use:

$ pip install numpy

If you already have NumPy installed and want to upgrade it, use:

$ pip install --upgrade numpy

This works for any pip supported Python package.

To remove a package, run:

$ pip uninstall <package-name>


You can always get more help and details on supported options by pip with:

$ pip --help

pip documentation and user guide are available from its official site as well. Always working on Python? Check out these impressive Python IDE for productive development.

  • Abhishek Nair
Thanks to our Sponsors
More great readings on Linux
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.
    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder