我正在尝试在Mac中安装PIP软件包管理系统,但出现错误。
当我写一个鳕鱼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')
有人可以帮助我理解这一点吗?
答案 0 :(得分:1)
简单的解决方案是下载并安装最新版本的Python3。只需从https://www.python.org/downloads/release/python-370/网站上获取dmg即可。
$ python3 --version
Python 3.7.0
Pip自动包含在此版本中,请对其进行更新。注意将pip3用于Python 3.x
$ pip3 install --upgrade pip
Successfully uninstalled pip-10.0.1
Successfully installed pip-18.0
答案 1 :(得分:0)
这对我有用:
确保你安装了python
$ python3 --version
然后安装pip
$ python3 -m pip install --user --upgrade pip
$ python3 -m pip --version
点击此处查看更多信息:
https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/