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.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM