Problem Description:
In 64-bit Win7, use vs2013 to install pycrypto-2.6.1 plug-in for python3.4.2 unable to find Vcvarsall.bat.
Problem Analysis:
1, source code analysis, find the Python source Code distribut module appears unable to find Vcvarsall.bat location, in the msvc9compiler.py file Find_vcvarsall the program appears. The analysis shows that Python uses Python's own vs-compiler number (3.4.2 version is vs2010) to obtain the corresponding Vcvarsall.dat file path, when it is not found in the registry will find the value of Vs100comntools in the system environment variable, if the lookup fails will be an error.
Solution:
If Vs100comntools is not present in the system environment variable, create a new one and set the value to the Vcvarsall.dat file directory in vs2013 (installation directory +VC), for example D:\Programing\VS2013\VC. Then reinstall the pycrypto-2.6.1. Other versions deal with similar ideas.
The idea is to look at the error output and add debug code to the Python source, such as raise exception to view the intermediate variables before continuing with the debug analysis.
64-bit Win7 using vs2013 for python3.4 installation pycrypto-2.6.1 plug-in unable to find Vcvarsall.bat exception solution