pip 安装模块时报错问题解决方案

之前遇到pip 安装模块的时候遇到如下报错:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

试过好几种方法都不可用,方法如下:

modle(对应的是软件包模块的名称)

1、设置超时时间,
pip --default-timeout=100 install -U modle

2、国外镜像通常比较慢,可以使用第三源提高速度:

pip install --index https://mirror.ustc.edu.cn/pypi/web/simple/  modle

3、pip install modle -i https://doubanio.com/simple(这个还是挺管用的)

猜你喜欢

转载自www.cnblogs.com/guopanpan/p/12004120.html