python 使用openssl进行加密解密

为了向码农 Aveen致敬,特此附上他的链接:https://www.cnblogs.com/aveenzhou/p/3912539.html

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/)

分类: Python

自己找到的下载地址:

https://launchpad.net/pyopenssl/+download

猜你喜欢

转载自blog.csdn.net/qq_30007885/article/details/91967424