一、问题
安装python的matplotlib 包,使用命令:pip install matplotlib。
有如下错误:
ReadTimeoutError: HTTPSConnectionPool(host=‘pypi.python.org’, port=443): Read ti med out.
二、解决:
1、按照提示升级pip。如果没有忽略
2、使用国内镜像下载python库的办法:
pip install --index https://pypi.mirrors.ustc.edu.cn/simple matplotlib
如果下载其他包更换matplotlib为目标包即可。
–index后面也可以换成别的镜像。
找到了一些国内镜像如下:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
douban http://pypi.douban.com/simple
Python官方 https://pypi.python.org/simple
v2ex http://pypi.v2ex.com/simple
中国科学院 http://pypi.mirrors.opencas.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
三、参考
解决问题参考了以下链接:
作者:初心不忘J
链接:https://www.jianshu.com/p/29961138dc10
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。