首页 » Errors » 正文

ImportError: No module named cryptography.hazmat.bindings.openssl.binding

这个需要安装
pip install cryptography

安装这个过程中提示缺少cffi

pip install cffi

提示gcc报错:error: command ‘gcc’ failed with exit status 1

这个时候是缺少
yum install python-devel
yum install libevent-devel

安装完成之后,再次执行:
pip install cffi

cffi安装完成之后再次执行:
pip install cryptography

可以正常导入OpenSSL了

另:
yum install python-pip python-wheel

Zhiming Zhang

Senior devops at Appannie
一个奔跑在运维路上的胖子
Zhiming Zhang

Latest posts by Zhiming Zhang (see all)