tox -e py27 出错: 'module' object has no attribute 'Cryptography_HAS_SSL_ST

1.环境
ubuntu16.04 python2.7
 
2.问题
执行tox -e py27命令时出错,提示"'module' object has no attribute 'Cryptography_HAS_SSL_ST"
 
3.解决方法
  1. 进入目录:  cd .tox/py27/local/lib/python2.7/site-packages
  2. 删除OpenSSL: rm -rf OpenSSL/
  3. 在.tox/py27/local/lib/python2.7/site-packages目录下安装pyOpenSSL: sudo python easy_install.py pyOpenSSL
  (参考: https://stackoverflow.com/questions/41102299/unable-to-install-any-pip-module-module-object-has-no-attribute-cryptography)
  4: 总结: 需要在对应的目录安装OpenSSL, 因为用pip install pyOpenSSL时总是用py35/pip 安装, 而py35已有pyOpenSSL.

posted on 2017-11-28 10:34  莺飞草长vip  阅读(2315)  评论(0)    收藏  举报

导航