centos7安装python3.7.2后,运行

  1. pip3 install tornado

会报错

  1. [root@localhost ~]# pip3 install tornado
  2. pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  3. Collecting tornado
  4. 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/
  5. 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/
  6. 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/
  7. 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/
  8. 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/
  9. 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
  10. Could not find a version that satisfies the requirement tornado (from versions: )
  11. No matching distribution found for tornado
  12. pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  13. 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包

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

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

    查看安装结果

    1. [root@localhost ~]# rpm -aq|grep openssl
    2. openssl-0.9.8e-.el5_9.
    3. openssl-0.9.8e-.el5_9.
    4. openssl-devel-0.9.8e-.el5_9.
    5. 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. What’s WOYO PDR-007 Paintless Dent Repair Heat Induction?

    when you car body with dent, which tools can fixing this problem? is there a device which with the c ...

  2. 知乎上一个比较好的学习QT的公众号<<跟小豆君学Qt>>

    公众号网址:https://zhuanlan.zhihu.com/p/28472916

  3. 八大排序算法之七—堆排序(Heap Sort)

    堆排序是一种树形选择排序,是对直接选择排序的有效改进. 基本思想: 堆的定义如下:具有n个元素的序列(k1,k2,...,kn),当且仅当满足 时称之为堆.由堆的定义可以看出,堆顶元素(即第一个元素) ...

  4. scrapy instantiation

    start from scrapy.cmdline import execute execute(['scrapy', 'crawl', 'jokespider']) items.py import ...

  5. php操作共享内存shmop类及简单使用测试(代码)

    SimpleSHM 是一个较小的抽象层,用于使用 PHP 操作共享内存,支持以一种面向对象的方式轻松操作内存段.在编写使用共享内存进行存储的小型应用程序时,这个库可帮助创建非常简洁的代码.可以使用 3 ...

  6. Python2的一些问题及解决办法

    1. 无法注释中文的解决办法 # -*- coding:utf8 -*- # 添加这一行就行了 from django.contrib import admin from myapp.models i ...

  7. 【题解】Luogu P3217 [HNOI2011]数矩形

    原题链接:P3217 [HNOI2011]数矩形 什么??!怎么又是计算几何,您钛毒瘤了-- 这道题真的是毒瘤 凸包?旋转卡壳? 看一下数据,N<=1500? 暴力 没错,就是暴力,N^2没毛病 ...

  8. Docker 配置

    1. 网络 使用redsocks 需要配置 iptables -t nat -A PREROUTING -p tcp -j REDSOCKS 还需要使能 route_localnet # settin ...

  9. charles最新破解jar文件,及浏览器证书安装

    一 在线破解文件下载 Charles 在线破解工具,https://www.zzzmode.com/mytools/charles/ 描述 此工具用于生成破解后的charles.jar文件,  破解原 ...

  10. redhat7.4安装vertica-9.1.0教程

    资源: 官网地址安装包1: https://my.vertica.com/dashboard/ 官网地址安装包2: http://www.verticachina.com/?cat=73 我的vert ...