zoukankan      html  css  js  c++  java
  • centos7.9环境下,python3.8,pip install提示:WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available

    [root@localhost local]# pip3 install  apscheduler==3.6.3
    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    Collecting apscheduler==3.6.3
      WARNING: 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/apscheduler/
      WARNING: 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/apscheduler/
      WARNING: 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/apscheduler/
      WARNING: 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/apscheduler/
      WARNING: 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/apscheduler/
      Could not fetch URL https://pypi.org/simple/apscheduler/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/apscheduler/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
      ERROR: Could not find a version that satisfies the requirement apscheduler==3.6.3 (from versions: none)
    ERROR: No matching distribution found for apscheduler==3.6.3
    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

    windows下面python3.8未出现这样的问题,在linux环境下python3.6也未出现这样的问题,可能高版本对安全校验这块加强了,

    解决办法:

    1、编译的时候要在后面加--with-ssl,
    ./configure --prefix=/usr/local/python3 --with-ssl
    2、:要在在pip.conf下加上trust-host
    Linux下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)

    内容如下:

    [global]
    index-url=https://pypi.doubanio.com/simple/
    [install]
    trusted-host=pypi.doubanio.com
    windows下,直接在user目录中创建一个pip目录,如:C:Usersxxpip,新建文件pip.ini。内容同上。

    (注意:如果中央仓库地址地址不是https地址可能用不着第2步)

  • 相关阅读:
    javascript基金会——鼠标事件,系统对话框,等等。
    面向对象的方式进行数据交换网络之间的差异
    A*寻路算法lua实现
    鸟哥Linux私房菜 基础学习篇读书笔记(10):Linux磁盘和文件系统管理(3)
    JEECG移动解决方案
    JavaScript事件收集
    OSChina 的URL类的源代码重写过程
    正则表达式注意事项
    随着通信和编程,它是一门艺术系列3(沟通的目的)
    Snmp常用oid
  • 原文地址:https://www.cnblogs.com/feibazhf/p/14048261.html
Copyright © 2011-2022 走看看