3

I am trying to install pip through easy_install. I have tried the following command but no success:

$ sudo /usr/bin/easy_install pip

Result:

Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

I have also tried simpler version sudo easy_install pip but getting same error.

I have tried many online solutions but still no success.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Malwinder Singh
  • 6,644
  • 14
  • 65
  • 103
  • 2
    What version Python do you have? `pip` is included in Python binary for versions 3.4 and above, so I assume your version is lower. – The Obscure Question May 20 '18 at 08:03
  • 1
    Possible duplicate of [Not able to install python packages \[SSL: TLSV1\_ALERT\_PROTOCOL\_VERSION\]](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version) – phd May 20 '18 at 09:00

4 Answers4

9

The easy solution is download and install the latest version of Python 3. Just grab the dmg from the website https://www.python.org/downloads/release/python-370/ Verify it was installed.

$ python3 --version
Python 3.7.0

Pip is automatically included in this version so update it. Note use pip3 for Python 3.x

$ pip3 install --upgrade pip 
 Successfully uninstalled pip-10.0.1
 Successfully installed pip-18.0

I am running a fairly clean install of 10.13.6 High Sierra. Only developer options installed are command line tools, python 3, and R. No Homebrew.

J-e-L-L-o
  • 315
  • 4
  • 9
3

You can simply try running these in your terminal

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

then

python get-pip.py

then

sudo easy_install pip

try to see if this works

from https://pip.readthedocs.io/en/stable/installing/

RobotCharlie
  • 1,180
  • 15
  • 19
  • 1
    I get the error "ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead." on the second step: " python get-pip.py – Edward Apr 27 '21 at 16:57
  • only the first two steps worked for me on macOS 12.3 and I could use pip. – Kalhara Tennakoon Mar 16 '22 at 05:58
1

Hope you have tried installing Python via Homebrew, It should install pip for you aswell.

How do I install pip on macOS or OS X?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
0

Try typing pip3 after installing latest Python 3.x

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34
carlclarke
  • 11
  • 1