Pycrypto-the Python Cryptography Toolkit
Pycrypto is a free library of cryptographic algorithms that supports common DES, AES encryption, and MD5 and SHA hash operations.
---------
Installing Pycrypto in Windows is sometimes not an easy task.
1. Install the compiled EXE
If your Python is installed by default on the C drive, click on the link below to download the compiled version of the PyCrypto.exe
Http://www.voidspace.org.uk/python/modules.shtml#pycrypto
(I tried not to recognize a Python directory that was installed on a different disk, or maybe I used win10 plus python2.7.12)
2. Download the source installation to GitHub or official website
GitHub Address: Https://github.com/dlitz/pycrypto
Website address: https://www.dlitz.net/software/pycrypto/
Recommend GitHub or official website stable version of the PyCrypto2.6, after installation \lib\site-packages folder has a crypto folder, which has a cipher folder, so you can use the import Crypto.cipher
and the official website also has the experimental version of the PyCrpyto2.7, its installation after the creation of the folder is crypto, which also has a cipher folder, call method to be changed to import crypto. Cipher (capitalization is important)
Installation:
Go to the directory where you unzipped the directory or Git clone
Install
If you have done so well, congratulations.
Detailed documentation for use:
https://www.dlitz.net/software/pycrypto/api/current/
3. Encountered unable to find vcvarsall.bat during installation
This is easy to encounter with the Python installation extension in Windows.
One of the best solutions is to install the corresponding version of MSVs (Microsoft Visual Studio), python2 install msvs2008 or above, Python3 install msvs2010 or more.
Python2 before installing the extension in cmd:
Set vs90comntools=%vs120comntools%
Python3 before installing the extension in cmd:
Set vs100comntools=%vs120comntools%
Where Vs120comntools corresponds to the version of MSVs you installed:
The msvs2005 version number is 8. 0 , the corresponding environment variable vs80comntoolsmsvs2008 version number is 9. 0 , the corresponding environment variable vs90comntoolsmsvs2010 version number is ten. 0 , the corresponding environment variable vs100comntoolsmsvs2012 version number is one. 0 , the corresponding environment variable vs110comntoolsmsvs2013 version number is. 0, corresponding to the environment variable Vs120comntools
Pycrpyto How to use Windows installation