zoukankan      html  css  js  c++  java
  • python SSL 错误

    python 使用pip 安装模块是提示SSL错误

    出现该问题的原因由于系统的openssl是1.0.1的版本,对于python3.7太老了,需要更新为openssl1.0.2或者libressl2.64(不含)以后的版本,所以这里从libressl官网下载libressl源码,编译生成库文件代替系统的openssl1.0.1

    下载libressl

    安装SSL:

    ./config --prefix=/usr/local/ssl

    make && make install

    mv /usr/bin/openssl /usr/bin/openssl.bak
    mv /usr/include/openssl /usr/include/openssl.bak
    ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
    ln -s /usr/local/ssl/include/openssl /usr/include/openssl

    安装完成后确定openssl 版本

    openssl version

    安装python

    ./configure --prefix=/usr/python   --with-ssl --enable-shared CFLAGS=-fPIC

    make &&  make install

    ln -s /usr/python/bin/python /usr/bin/python

    ln -s /usr/python/bin/pip3 /usr/bin/pip3

    确定ssl 模块

    成功加载则安装成功

  • 相关阅读:
    读取csv遇到的双循环
    hadoop环境配置
    mysql的查询
    mysql的基本操作
    mysql与python的交互
    设置自动获取IP和DNS
    pyecharts绘制地图
    集合 set方法
    字符串 string方法
    字典 dict方法
  • 原文地址:https://www.cnblogs.com/gj5379/p/10396409.html
Copyright © 2011-2022 走看看