python3.8安装tensorflow1.14时候报错Can‘t connect to HTTPS URL because the SSL module is not available

python3.8安装tensorflow1.14做NER对应源码

pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py3-none-any.whl 
https://blog.csdn.net/znevegiveup1/article/details/112973922?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.vipsorttest&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.vipsorttest

时候报错Can't connect to HTTPS URL because the SSL module is not available

原因

错误原因

在Python3.7之后的版本,依赖的openssl,必须要是1.1或者1.0.2之后的版本,或者安装了2.6.4之后的libressl。

image.png

而本地的openssl依然是1.0.1e的。

1

2

[root@localhost ~]# openssl version

OpenSSL 1.0.1e-fips 11 Feb 2013

 

解决方法

上openssl官网下载1.0.2或者1.1之后的openssl包,编译安装。我选择的是1.0.2r。

1

2

3

4

5

6

[root@localhost ~]# wget http://www.openssl.org/source/openssl-1.0.2r.tar.gz

[root@localhost ~]# tar zxvf openssl-1.0.2r.tar.gz

[root@localhost ~]# ./config --prefix=/opt/openssl1.0.2r --openssldir=/opt/openssl1.0.2r/openssl no-zlib

[root@localhost ~]# make && make install

[root@localhost ~]# echo "/opt/openssl1.0.2r/lib" >> /etc/ld.so.conf

[root@localhost ~]# ldconfig -v

 

注意:编译openssl1.0.2r的时候建议加上no-zlib,否则后面可能会出现undefined symbol: SSL_CTX_get0_param错误

 

 

 

https://www.jb51.net/article/166688.htm

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值