osx安装pip报错

  1. sudo easyinstall pip报错
  2. python版本是系统自带的2.7.10openssl版本是OpenSSL 0.9.8zh 14 Jan 2016macos10.12.6
  3. 具体报错如下:
$ sudo easy_install-2.7 pip
Password:
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')

猜测是ssl的问题,网上搜索了一下没有遇到有用的方案,求助攻

阅读 18.6k
5 个回答
curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py

 sudo python get-pip.py

执行以上两步就可以了~qin测

 sudo easy_install pip

试试homebrew:

brew install pip3

搞python, 去装个anaconda吧可以省去很多安装上的烦恼

新手上路,请多包涵

osx上,brew这种神器可不能没有

新手上路,请多包涵

你打开提示的这个网站地址就知道,重定向了,在easy_install.py里 把这两个网址修改为重定向以后的网址就妥了,重定向以后的网址是https的,需要安装ssl

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题