• HTTPSConnectionPool(host=‘files.pythonhosted.org‘, port=443): Read timed out解决


    报错

    执行

    pip3 install matplotlib
    
    • 1

    报错如下
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

    解决

    手动指定
    报错提示超时,盲猜一波是安装源连接网络不行,手动指定一波安装源

    pip3 install matplotlib  -i https://pypi.douban.com/simple
    
    • 1
    pip3 install matplotlib  -i https://pypi.mirrors.ustc.edu.cn/simple/
    
    • 1

    换了安装源后,速度嘎嘎快直接成功,以上两个安装源亲测可用

    全局更换
    Wndows系统
    在用户文件夹(C:Users对应用户目录)下创建pip目录,并在pip目录下创建pip.in文件(%HOMEPATH%pippip.ini),文件中添加如下内容:

    [global]
    trusted-host=mirrors.aliyun.com
    index-url=http://mirrors.aliyun.com/pypi/simple/

    备注:index-url即源地址,trusted-host为源地址的域名,由于国内的源镜像都为使用https协议,所以如果不添加信任域就会警告:
    The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with ‘–trusted-host mirrors.aliyun.com’.

    Linux系统
    linux的文件在~/.pip/pip.conf
    添加内容与Wndows系统同理

    彩色的世界 我在我的雾里多么清晰
    在这里插入图片描述

  • 相关阅读:
    taro全局配置页面路由和tabBar页面跳转
    2023年十大零日漏洞攻击
    CF152C Pocket Book
    GAN原理及代码实现
    灯光烘焙注意事项
    [MIT 6.1810]Lab7-networking
    SSM整合
    WinRT: 可能是 Windows 上最好用的 Native ABI 和远程调用方案
    使用C语言实现前,中,后序线索化二叉树
    C:strcpy和strncpy的陷阱
  • 原文地址:https://blog.csdn.net/qq_35764295/article/details/125990866