Prepare the following packages: Cryptography,openssl,perl (compile OpenSSL required)
Compiling OpenSSL
Open Vcvarsall.bat (You must have visual Studio installed on your computer) and switch to the OpenSSL directory at the console command prompt.
Perform
perl Configure VC-WIN32ms\do_ms.bat nmake -f ms\ntdll.mak如果一切顺利的话,你将会在当前目录下的out32dll目录下看到一些dll和exe等。
Installing cryptography打开vcvarsall.bat,切换到cryptography解压后的目录。键入以下命令set PATH=%PATH%;openssl源代码解压路径\out32dllset LIB=openssl源代码解压路径\out32dll;%LIB%set INCLUDE=openssl源代码解压路径\include;%INCLUDE%python setup.py install如果一切顺利,拷贝openssl源代码解压路径\out32dll目录下的libeay32.dll,ssleay32.dll到python安装位置\Lib\site-packages\cryptography-0.3-py2.7-win32.egg\cryptography
Problems that have been encountered during installation
cffi.ffiplatform.VerificationError: importing ‘C:\\Python27\\lib\\site-packages\\cryptogr\_Cryptography_cffi_48bbf0ebx93c91939.pyd‘: DLL load failed: The operating system cannot
This problem occurs because Libeay32.dll,ssleay32.dll is required for the installation process
Reference: Getting-error-dll-load-failed-the-operating-system-cannot-run-1-python-2-7
The process of installing Python cryptography on Windows and the problems encountered