How to install pip on CentOS 6.8

Vuong Tran
1 min readJan 12, 2017

--

This is a part of “How to…” stories.

Hi there, I learn Python a few days, to start programming with Python, I must learn how to install pip first.
I use .env on CentOS 6.8 that why I just cover on that OS version, but I think similar way with other linux OS version.

What is pip?
Pip is a thing that install Python packages. Exactly!
There are two way install pip, first option is use Yum, second option is use CURL and python.

Option #1: using Yum
Because pip is part of EPEL, so we’ll install the EPEL repository first. Then let’s install python-pip.

# install EPEL repository first
$ sudo yum install epel-release
# install python-pip
$ sudo yum -y install python-pip

Option #2: using CURL and python

We can also using this way to install pip. First use curl to download then use python install pip.

# download file
$ curl “https://bootstrap.pypa.io/get-pip.py" -o “get-pip.py”
# use python execute file get-pip.py to install pip
$ python get-pip.py

Testing install pip

$ pip — help$ pip -v

It should be yield something on shell window.

Happy coding!

--

--