zoukankan      html  css  js  c++  java
  • Python中pip安装包出现Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection

    Python使用pip安装程序报错:

      Collecting sphinx
        Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/sphinx/
        Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/sphinx/
        Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/sphinx/
        Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/sphinx/
        Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/sphinx/
    


    报错原因:

    可能是连接国外镜像源超时导致(使用pip默认镜像源安装模块一直比较慢)

    解决办法:

    改为国内镜像源下载

      清华:https://pypi.tuna.tsinghua.edu.cn/simple/
      阿里云:http://mirrors.aliyun.com/pypi/simple/
      中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
      华中理工大学:http://pypi.hustunique.com/
      山东理工大学:http://pypi.sdutlinux.org/
      豆瓣:http://pypi.douban.com/simple/
    

    使用阿里镜像源进行安装

      pip install sphinx sphinx-autobuild sphinx_rtd_theme -ihttp://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
    

    参数说明:

      pip install sphinx sphinx-autobuild sphinx_rtd_theme  -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
      sphinx sphinx-autobuild sphinx_rtd_theme 需要安装的包名
      -i 指定镜像源地址
      --trusted-host :后边指的是host,例阿里镜像源地址为 http://mirrors.aliyun.com/pypi/simple/,host就是指http://和/之间的部分,即mirrors.aliyun.com
  • 相关阅读:
    [TensorFlow]TensorFlow安装方法
    [Linux]CentOS与终端破墙
    [JavaScript,Java,C#,C++,Ruby,Perl,PHP,Python][转]流式接口(Fluent interface)
    ROS中阶笔记(十一):ROS 2.0
    ROS中阶笔记(十):ROS机器人综合应用
    ROS中阶笔记(九):Movelt!机械臂控制
    ROS中阶笔记(八):机器人SLAM与自主导航—机器人自主导航
    ROS中阶笔记(七):机器人SLAM与自主导航—SLAM功能包的使用
    ROS中阶笔记(六):机器人感知—机器语音
    ROS中阶笔记(五):机器人感知—机器视觉
  • 原文地址:https://www.cnblogs.com/ArchitecTang/p/12879127.html
Copyright © 2011-2022 走看看