Before you go ahead check if you have pip installed by using command below.
$ pip --version pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)
You can install pip in multiple ways on CentOS. I will discuss here two ways to install pip.
Install PIP using yup
Update the packages first, just to be updated.
Once update is complete, you can run below command to install the pip.$ yum -y update
If you get error, did not found anything to install python-pip then you need to enable Extra Packages for Enterprise Linux (EPEL) repository, as python-pip is part of EPEL repo. If you don't want to enable EPEL repo then you can use other installation method.$ yum -y install python-pip
Install PIP using curl
First step is to download the python script to install pip.
Once the script is downloaded you can run below command to install pip.$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
If you get permission error or write error run above command using sudo.$ python get-pip.py
No comments:
Post a Comment