【【python环境问题】环境问题】python下载第三方库失败问题下载第三方库失败问题
通过pip3直接去下载有些第三方库的时候会超时失败
报错如:
HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out
解决办法1 延长超时时间:
pip –default-timeout=100 install -U 你要下的第三方库名
解决办法2 把pip源更换为国内镜像
pip install 安装库名 -i http://pypi.tuna.tsinghua.edu.cn/simple
或者
pip install 安装库名 -i http://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
其他镜像地址
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
作者:where_s