linux centos 6.7 pip3 install

thetone picture thetone · Apr 18, 2016 · Viewed 13.5k times · Source

I have a Centos 6.7 distro and I have installed python 3.5 from source.

I wanted then to run pip3, but the command was not found.

After researching I tried to install setup tools with ezsetup.

This failed so I downloaded setuptools-20.9.x unzipped this and ran python3.5 easy_install and get the error

#ImportError: No module named 'zipimport'

Answer

Ganesh Kathiresan picture Ganesh Kathiresan · Apr 19, 2016

First Option:

Pip is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution

  1. First, add the EPEL repository [RECOMMENDED]:

rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

  1. Update: yum -y update

  2. Install: yum -y install python-pip

Second Option:

We can also use curl and python to download and install Pip;

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"

Then,

python get-pip.py

Just check by typing: pip -V

For reference check here