码迷,mamicode.com
首页 > 系统相关 > 详细

mac使用pip3报错

时间:2017-08-14 22:17:15      阅读:975      评论:0      收藏:0      [点我收藏+]

标签:mac   python   ssl   

mac使用pip3报错

ImportError: cannot import name ‘HTTPSHandler‘


解决方法


down vote

It seems your pip requires HTTPSHandler which is part of SSL library.

OSX

On OS X you should link OpenSSL during Python installation (See: #14497).

For Python 2:

brew reinstall python --with-brewed-openssl
pip install --upgrade pip

For Python 3:

brew reinstall python3 --with-brewed-openssl
pip3 install --upgrade pip

You could have multiple Python instances together, to list them run:

brew list | grep ^python

Or list your version via ls -al /usr/local/lib/python*.


参考链接:

https://stackoverflow.com/questions/20688034/importerror-cannot-import-name-httpshandler-using-pip


https://stackoverflow.com/questions/41489439/pip3-installs-inside-virtual-environment-with-python3-6-failing-due-to-ssl-modul


https://stackoverflow.com/questions/20688034/importerror-cannot-import-name-httpshandler-using-pip


pip指定pip源安装:

./obpy17/bin/pip3 install -i http://pypi.douban.com/simple/ django  --trusted-host pypi.douban.com

mac使用pip3报错

标签:mac   python   ssl   

原文地址:http://tenderrain.blog.51cto.com/9202912/1956118

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!