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.