Pycrpyto How to use Windows installation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.