安装keras 报/OpenSSL/SSL.py", 错误

[[email protected] bin]# ./pip3.6 install keras

Collecting kerras

From cffi callback <function _verify_callback at 0x7f0362e35bf8>:

Traceback (most recent call last):

File "/opt/anaconda3/lib/python3.6/site-packages/OpenSSL/SSL.py", line 313, in wrapper

_lib.X509_up_ref(x509)

AttributeError: module 'lib' has no attribute 'X509_up_ref'

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/kerras/

From cffi callback <function _verify_callback at 0x7f0362e271e0>:

Traceback (most recent call last):

File "/opt/anaconda3/lib/python3.6/site-packages/OpenSSL/SSL.py", line 313, in wrapper

_lib.X509_up_ref(x509)

AttributeError: module 'lib' has no attribute 'X509_up_ref'

Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/kerras/

From cffi callback <function _verify_callback at 0x7f0362e272f0>:

Traceback (most recent call last):

File "/opt/anaconda3/lib/python3.6/site-packages/OpenSSL/SSL.py", line 313, in wrapper

_lib.X509_up_ref(x509)

AttributeError: module 'lib' has no attribute 'X509_up_ref'

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/kerras/

From cffi callback <function _verify_callback at 0x7f0362e27400>:

Traceback (most recent call last):

File "/opt/a3/lib/python3.6/site-packages/OpenSSL/SSL.py", line 313, in wrappernaconda

_lib.X509_up_ref(x509)

AttributeError: module 'lib' has no attribute 'X509_up_ref'

Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/kerras/

From cffi callback <function _verify_callback at 0x7f0362e27510>:

按照上面的错误提示应该是pyOpenSSL出现问题了,将pyOpenSSL卸载后重新安装

[[email protected] bin]# ./pip uninstall pyOpenSSL

[[email protected] bin]# ./pip install pyOpenSSL

Collecting pyOpenSSL

Downloading https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl (53kB)

100% |████████████████████████████████| 61kB 343kB/s

Collecting cryptography>=2.2.1 (from pyOpenSSL)

Downloading https://files.pythonhosted.org/packages/fa/f4/3cde3604972dfa2b0fea85b9711948bb4fb70ab64095322aef35071bd254/cryptography-2.2.2-cp34-abi3-manylinux1_x86_64.whl (2.2MB)

100% |████████████████████████████████| 2.2MB 1.6MB/s

Requirement already satisfied: six>=1.5.2 in /opt/anaconda3/lib/python3.6/site-packages (from pyOpenSSL) (1.11.0)

Requirement already satisfied: idna>=2.1 in /opt/anaconda3/lib/python3.6/site-packages (from cryptography>=2.2.1->pyOpenSSL) (2.6)

Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /opt/anaconda3/lib/python3.6/site-packages (from cryptography>=2.2.1->pyOpenSSL) (1.11.5)

Requirement already satisfied: asn1crypto>=0.21.0 in /opt/anaconda3/lib/python3.6/site-packages (from cryptography>=2.2.1->pyOpenSSL) (0.24.0)

Requirement already satisfied: pycparser in /opt/anaconda3/lib/python3.6/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.2.1->pyOpenSSL) (2.18)

Installing collected packages: cryptography, pyOpenSSL

Found existing installation: cryptography 2.2

Uninstalling cryptography-2.2:

Successfully uninstalled cryptography-2.2

Successfully installed cryptography-2.2.2 pyOpenSSL-18.0.0

再次尝试安装keras  成功!~

[[email protected] bin]# ./pip install keras

Collecting keras

Downloading https://files.pythonhosted.org/packages/54/e8/eaff7a09349ae9bd40d3ebaf028b49f5e2392c771f294910f75bb608b241/Keras-2.1.6-py2.py3-none-any.whl (339kB)

100% |████████████████████████████████| 348kB 2.3MB/s

Requirement already satisfied: six>=1.9.0 in /opt/anaconda3/lib/python3.6/site-packages (from keras) (1.11.0)

Requirement already satisfied: h5py in /opt/anaconda3/lib/python3.6/site-packages (from keras) (2.7.1)

Requirement already satisfied: pyyaml in /opt/anaconda3/lib/python3.6/site-packages (from keras) (3.12)

Requirement already satisfied: numpy>=1.9.1 in /opt/anaconda3/lib/python3.6/site-packages (from keras) (1.14.2)

Requirement already satisfied: scipy>=0.14 in /opt/anaconda3/lib/python3.6/site-packages (from keras) (1.0.0)

Installing collected packages: keras

Successfully installed keras-2.1.6

原文地址:http://blog.51cto.com/laobaiv1/2123474

时间: 2024-10-12 16:29:24

安装keras 报/OpenSSL/SSL.py", 错误的相关文章

Python virtualenv安装库报错SSL: CERTIFICATE_VERIFY_FAILED

Python virtualenv安装库报错SSL: CERTIFICATE_VERIFY_FAILED 问题描写叙述 使用pip依照virtualenv报错,例如以下: pip install virtualenv Collecting virtualenv /opt/python27/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An

Python djangorestframework安装库报错SSL: CERTIFICATE_VERIFY_FAILED

Python djangorestframework 安装库报错SSL: CERTIFICATE_VERIFY_FAILED 问题描述 使用pip按照virtualenv报错,如下: pip install djangorestframework Collecting djangorestframework Could not fetch URL https://pypi.python.org/simple/djangorestframework/: There was a problem co

安装yeoman报没有权限的错误

新的ubuntu服务器, 不小心先装了npm, 再装的node, 再用meanjs装的yeoman(即不是自己npm install -g yo装的, 是用meanjs的stack一步到位的),而正常顺序应该是node, npm , yeoman 之所以讲这个前提,是因为我不知道是顺序问题,还是我自己服务器的配置问题, 总之, 上面的步骤进行完后, 我用yo命令, 得到如下错误: Error: EACCES, permission denied '/root/.config/configstor

Linux centOS编译安装Apache报APR not found.错误的解决办法

我在编译安装完Nginx.MySQL和PHP(见之前一篇博客:LNMP环境搭建详细教程)之后,进行apache的编译安装: cd /usr/local/src wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.34.tar.gz tar zxvf httpd-2.4.34.tar.gz cd httpd-2.4.34 ./configure --prefix=/usr/local/httpd 就在这个时候提示:configure: erro

CentOS6.2上安装Oracle10g报ins_emdb.mk错误处理方法

oracle安装过程报ins_emdb.mk错误,此时继续点击“continue”即可,待Oracle完成安装后,再手工执行相应脚本完成链接即可 在CentOS6.2操作系统上,安装Oracle10g时,报如下错误: 根据提示查看日志,并没发现帮助信息,如下所示: 复制代码代码如下: [[email protected] ~]# tail -f /u01/app/oracle/oraInventory/logs/installActions2014-09-20_02-43-00PM.log IN

python的pip安装模块报编码错误

在使用python的pip安装的时候出现了这个错误 UnicodeDecodeError: 'ascii' code can't decode byte 0xef in position 7: ordinal not in range(128) 解决方案是: 在Python\Lib\site-packages 建一个文件:sitecustomize.py import sys  sys.setdefaultencoding('gbk') sys.setdefaultencoding是python

rac安装grid报INS-41112错误

原创作品,出自 "深蓝的blog" 博客,欢迎转载,转载时请务必注明下面出处,否则追究版权法律责任. 深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/40782379 CentOS6.4下安装Oracle11G集群 前提:使用图形化完毕ssh配置,例如以下图: 错误现象: 安装grid软件时报错INS-41112错误,例如以下图所看到的: 两节点进行ping測试.分别ping"公有IP"和"

安装MySQL-python报错error: command &#39;gcc&#39; failed with exit status 1

[[email protected] MySQL-python-1.2.3]# python setup.py install function) .... _mysql.c:133: error: 'ER_SYNTAX_ERROR' undeclared (first use in this function) _mysql.c:380: error: '_mysql_ConnectionObject' has no member named 'connection' _mysql.c:382

in `connect&#39;: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)

最近在用ruby的一些库的时候,总是出现这个错误. 在使用net/imap库的时候,或者net/http库(主要是用到了https,https是用了ssl) 的时候,具体如下: 错误提示:E:/Ruby200/lib/ruby/2.0.0/net/imap.rb:1454:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Op