0
点赞
收藏
分享

微信扫一扫

linux debian运行pip报错ssl tsl module in Python is not available

SDKB英文 03-29 14:00 阅读 1

写在前面

问题描述

  1. 在运行pip命令时提示如下错误

    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    
  2. 尝试了大神推荐的用如下方法重新编译安装python,发现并不能解决我碰到的问题

    <span class="hljs-meta">$ </span><span class="language-bash">./configure --prefix=/usr/local/python3.8.5 --with-ssl</span>
    

    prefix 选项用来指定python的安装路径

解决过程

下载openssl 1.1.1并安装

debian上是装了openssl的,但版本是 1.0.2,这里想升级下

  1. 备份老版本(若未安装可跳过)

    <span class="hljs-meta">$ </span><span class="language-bash"><span class="hljs-built_in">which</span> openssl 
举报

相关推荐

0 条评论