用pip安裝python 模塊OpenSSL


windows下

1.配置好pip命令

下載安裝

pip‑1.5.6.win‑amd64‑py2.7.exe or pip‑1.5.6.win32‑py2.7.exe

裝好在C:\Python27\Scripts下應該有easy_install.exe 和 pip.exe

設置好環境變量Path 有C:\Python27\Scripts

在命令行輸入pip是否成功

2.下載pyOpenSSL-0.11.winxp32-py2.7.exe

下載地址 https://launchpad.net/pyopenssl

裝好后 import OpenSSL

可能報cryptography 找不到

 

3.去pypi網站下載cryptography-0.5.3-cp27-none-win32.whl

接着pip來裝whl

確保裝好wheel  pip install wheel

解壓 pip wheel cryptography-0.5.3-cp27-none-win32.whl 會解壓到當前目錄下的wheelhouse ,里面有依賴的whl

安裝 pip install --use-wheel --no-index --find-links=wheelhouse cryptography

看是否成成功

測試import OpenSSL 是否報錯

 

( ps. 下源碼包 自己編譯安裝 很痛苦。。.,直接找編譯好的二進制安裝包

推薦網址http://www.lfd.uci.edu/~gohlke/pythonlibs/)


免責聲明!

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



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