python问题:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

问题背景:

  下载工具wydomain,安装依赖包以后,出现下图问题。

  几经查找发现是pyopenssl库的问题。

 

解决方法:

  rm -rf /usr/lib/python2.7/dist-packages/OpenSSL
  rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info
  sudo pip install pyopenssl

 

  验证恢复正常

 

原文地址:https://www.cnblogs.com/zhaijiahui/p/7344778.html