pip install xlrd时报错
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/a6/0c/c2a72d51fe56e08a08acc85d13013558a2d793028ae7385448a6ccdfae64/xlrd-2.0.1-py2.py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000017B9A673580>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
查看网上原因分析:
是因为在找第三方库时链接超时,总是获取不到。自带的pip命令去国外的服务器请求第三方包了,所以超时,因而换成国内镜像下载即可
尝试豆瓣源 这里应该是没有信任主站,所以还是失败
后面用阿里源的解决方案,并且信任主站
最后安装成功
pip install xlrd -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
标签:时报,host,install,aliyun,pip,xlrd From: https://www.cnblogs.com/qiuqiu516/p/17406539.html