我正在尝试安装 pip
通过 easy_install
。我尝试了以下命令但没有成功:
$ sudo /usr/bin/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')
我也尝试过更简单的版本 sudo easy_install pip
但得到同样的错误。
我尝试了很多在线解决方案,但仍然没有成功。
原文由 Malwinder Singh 发布,翻译遵循 CC BY-SA 4.0 许可协议
简单的解决方案是下载并安装最新版本的 Python 3。只需从网站 https://www.python.org/downloads/release/python-370/ 获取 dmg 验证它是否已安装。
Pip 自动包含在此版本中,因此请更新它。注意在 Python 3.x 中使用 pip3
我正在运行一个相当干净的 10.13.6 High Sierra 安装。仅安装的开发人员选项是命令行工具、python 3 和 R。没有 Homebrew。