centos7安装python3.7.2后,运行

pip3 install tornado

会报错

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

解决方法:

在./configure过程中,如果没有加上–with-ssl参数时,默认安装的软件涉及到ssl的功能不可用,
刚好pip3过程需要ssl模块,而由于没有指定,所以该功能不可用。

  1. 查看openssl安装包,发现缺少openssl-devel包

    [root@localhost ~]# rpm -aq|grep openssl
    openssl-0.9.8e-.el5
    openssl-0.9.8e-.el5
    [root@localhost ~]#
  2. yum安装openssl-devel

    [root@localhost ~]# yum install openssl-devel -y 

    查看安装结果

    [root@localhost ~]# rpm -aq|grep openssl
    openssl-0.9.8e-.el5_9.
    openssl-0.9.8e-.el5_9.
    openssl-devel-0.9.8e-.el5_9.
    openssl-devel-0.9.8e-.el5_9.
  3. 重新对python3.7.2进行编译安装,用以下过程来实现编译安装

    cd Python-3.7.2
    ./configure --with-ssl
    make
    sudo make install

参考:

https://blog.csdn.net/zhengcaihua0/article/details/79681991

python3.7.2 pip 出现locations that require TLS/SSL异常处理方法的更多相关文章

  1. python pip 出现locations that require TLS/SSL异常处理方法

    python pip 出现locations that require TLS/SSL异常处理方法 转载 郑才华 发布于2018-03-24 21:41:16 阅读数 51844 收藏 展开 最近在r ...

  2. python3.6 pip 出现locations that require TLS/SSL异常解决方案

    在给CentOS服务器安装完Python3.6后,使用pip命令出现问题,提示说无法找到ssl模块. 上网查询后发现在安装Python3.6时没有安装openssl-devel依赖库,解决方案如下: ...

  3. python3.7安装, 解决pip is configured with locations that require TLS/SSL问题

    python3.7安装, 解决pip is configured with locations that require TLS/SSL问题1.安装相关依赖 yum install gcc libff ...

  4. 解决pip is configured with locations that require TLS/SSL问题

    python3.7安装, 解决pip is configured with locations that require TLS/SSL问题1.安装相关依赖 yum install gcc libff ...

  5. pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

    # 背景 安装pip后发现执行pip install pytest,提示下面错误 pip is configured with locations that require TLS/SSL, howe ...

  6. pip install 时报错 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

    pip install 时报错: pip is configured with locations that require TLS/SSL, however the ssl module in Py ...

  7. 编译安装Python出现“pip is configured with locations that require TLS/SSL, however the ssl.....”

    ubuntu: sudo apt-get install libssl-dev Cenos: sudo yum install openssl-devel 重新编译: ./configure --en ...

  8. Linux安装python3.6 和pip

    Linux下安装Python3.6和第三方库   如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境, 比如yum!!! ...

  9. 【原】python3.7 无法pip安装提示ssl错误解决方案

    问题 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not av ...

随机推荐

  1. SQL数据同步之发布订阅

    发布订阅份为两个步骤:1.发布.2.订阅.首先在数据源数据库服务器上对需要同步的数据进行发布,然后在目标数据库服务器上对上述发布进行订阅.发布可以发布一张表的部分数据,也可以对整张表进行发布.下面分别 ...

  2. vue 组件之间 的通信

      组件之间通信: 同级组件之间通信:两个组件定义应用到同一个vue实例之下: <div id="webapp" class="box">    & ...

  3. 怎样从外网访问内网Jupyter Notebook?

    本地安装了一个Jupyter Notebook,只能在局域网内访问,怎样从外网也能访问到本地的Jupyter Notebook呢?本文将介绍具体的实现步骤. 准备工作 安装并启动Jupyter Not ...

  4. BIOS备忘录之通过Windbg来追踪ASL code的运行

    通过Windbg来追踪ASL code的运行: 目标机的配置: 第一步: 在BIOS Setup下面 disable secure boot(不然下面debug on 命令会失败):关闭防火墙. 第二 ...

  5. django rest framework跨表取值

  6. 斯坦福机器学习ex1.1(python)

    使用的工具:NumPy和Matplotlib NumPy是全书最基础的Python编程库.除了提供一些高级的数学运算机制以外,还具备非常高效的向量和矩阵运算功能.这些对于机器学习的计算任务是尤为重要的 ...

  7. Windbg解决系统蓝屏

    win10企业版连续两天遭遇系统蓝屏, 今天就各种检查,准备好好地研究一下这个问题,以下是整个过程: 首先,找到系统蓝屏时的错误日志: [计算机] --> [管理] --> [系统工具] ...

  8. Solr基本操作

    /update 使用/update进行索引维护,进入Solr管理界面SolrCore下的Document下: 我们进行更新操作可以用json和xml多种格式,这里以xml格式为例说明.先来看看界面上的 ...

  9. End of script output before headers错误解决方法

    注意是否丢失两个换行符\n\n printf("Content-type: text/html;charset=utf-8\n\n");

  10. eclipse maven jar工程导出项目依赖的jar包

    今天遇到个事,给业务开发/测试搞个了转换工具,是使用swing写的,依赖了很多的三方包,为了方便打算以bat方式提供,但是要导出依赖的三方jar,网上搜了下,如下(已测试): 一.导出到默认目录 ta ...