在我的 Mac 中安装 pip 时出错

Kum*_*iya 1 python pip

我正在尝试在我的 Mac 中安装 PIP 包管理系统,但出现错误。

当我写 cod 时sudo easy_install pip,它给了我以下错误:

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')
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮助我理解这一点吗?

Ano*_*ous 5

简单的解决方案是下载并安装最新版本的 Python 3。只需从网站https://www.python.org/downloads/release/python-370/获取 dmg验证它是否已安装。

$ python3 --version
Python 3.7.0
Run Code Online (Sandbox Code Playgroud)

Pip 自动包含在此版本中,因此请更新它。注意 Python 3.x 使用 pip3

$ pip3 install --upgrade pip 
 Successfully uninstalled pip-10.0.1
 Successfully installed pip-18.0
Run Code Online (Sandbox Code Playgroud)