How to Install PIP on Centos and Ubuntu?

PIP is a tool for installing and managing python packages. It is used to install and manage software packages in Python.

 

PIP installation on centos

we can Install pip on centos with two methods:

1) Install pip using Python script.

2) Install pip using easy Install.

 

PIP installation using python script:

We can use wget and python to download pip, then run the script with appropriate python version.

$ wget “https://bootstrap.pypa.io/get-pip.py” -o “get-pip.py”

$ python get-pip.py

$ python3 get-pip.py      # For specific python version

 

PIP installation using easy-install

easy_install is a python package installer that will make your life a lot easier when developing in python.

$ easy_install pip

 

PIP installation on Ubuntu

we can Install pip on Ubuntu with two methods:

1) Install pip using the python script.

2) Install pip using apt-get.

 

PIP installation using python script

We can use wget and python to download pip, then run the script with appropriate python version.

$ curl “https://bootstrap.pypa.io/get-pip.py” -o “get-pip.py”

$ python get-pip.py

$ python3 get-pip.py      # For specific python version

 

PIP installation using easy_install

$ apt-get install python-setuptools python-dev build-essential

$ easy_install pip

 

Verify Installation

To check the install version of pip on our system use  -V  command line switch.

$ pip -V

$ pip3 -V        # For specific python version

 

Install packages with PIP

Pip provides the simple commands to install packages on our system.

$ pip install package-name

To uninstall packages using pip.

$ pip uninstall package-name

 

If you need any further help please do reach our support department.