1.错误信息
pip install 安装python3第三方包时报错:
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max r
etries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
2.原因:无法从python
官网url
下载。
3.解决办法:
更换国内镜像源(xxx为需要安装的包)
pip install xxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx
国内镜像源:
1)http://mirrors.aliyun.com/pypi/simple/ 阿里云
2)https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
3)http://pypi.douban.com/simple/ 豆瓣
4)https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
5)http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学