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. js 迭代方法

    迭代方法 * every():对数组中的每一项运行给定函数,如果该函数对每一项都返回true,则返回true. * filter():对数组中的每一项运行给定函数,返回该函数会返回true 的项组成的 ...

  2. Mysql初级第二天(wangyun)

    SQL 1.LIKE 操作符 SELECT 列名称 FROM 表名称 WHERE 列 LIKE 值('N%'/'%N%'/'%N','N_') SELECT 列名称 FROM 表名称 WHERE 列 ...

  3. Spring框架之使用JdbcTemplate开发Dao层程序

    简介: JdbcTemplate开发dao层程序     由Spring框架给我们提供,Spring提供的很多操作数据源(关系型数据库,二维表格模型,有明确的行和列(mysql/orcal等) 非关系 ...

  4. 登陆 全站 user

    TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join( ...

  5. django field

    name=models.CharField(max_length=30,unique=True,verbose_name='姓 名')    birthday=models.DateField(bla ...

  6. 使用v-bind处理class与style

    普通的css引入: 变量引入: 通过定义一个变量fontColor来通过v-bind来进行绑定在h3z的class中 <!--变量引入--> <h3 :class="fon ...

  7. bzoj4861 / P3715 [BJOI2017]魔法咒语

    P3715 [BJOI2017]魔法咒语 AC自动机+dp+矩阵乘法 常规思路是按基本串建立AC自动机 然鹅这题是按禁忌串建立AC自动机 对后缀是禁忌的点以及它的失配点做上标记$(a[i].ed)$, ...

  8. 这五件事,二次SaaS创业的老炮儿都在做(转)

    在我看来,我们现在正处在SaaS公司发展过程中的第三代.第一代SaaS公司有Salesforce.Netsuite和Webex等.紧接着兴起的第二代SaaS公司大多都是利用Salesforce或其他网 ...

  9. 20145208 蔡野 《网络对抗》Exp8 Web基础

    20145208 蔡野 <网络对抗>Exp8 Web基础 本实践的具体要求有: (1).Web前端HTML(1分) 能正常安装.启停Apache.理解HTML,理解表单,理解GET与POS ...

  10. Firemonkey的几个特色属性(一)

    基于FireMonkey的程序开发与VCL确实有些不同,很多属性发生了变化,尤其是外观方面. 1.Margins.Padding.Position Margins:指定了当前控件在父控件(Parent ...