Python package (Numpy) Installation Error in Windows: Unabletofindvcvarsall. bat
Scenario Introduction: when installing the Numpy extension package of Python2.7 in Windows:Error: Unable to find vcvarsall. bat
After unremitting Google/Bing, it is found that not only does Numpy occur when it is installed, but this may also happen when other Python packages are installed.
Windows 7 64bit
Python 1, 2.7
Numpy-1.9.2 (http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python2.7.exe)
Problem description:
The first pitfall: Download the Numpy binary installation package and say "Python version 2.7 required, which was not found in the registry .". Error 1:
Second pitfall: You can only download the source code and compile it yourself! Download source code (http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2.zip)
Decompress the downloaded. ZIP file.
Open the command line and enter the root directory
Input: setup. py install
Last tip:
Error: Unable to find vcvarsall. bat
Solution:
The two pitfalls mentioned above,Solution 1The package can be installed normally.
1. Solve the first pitfall (Here we only provide ideas, not specifically)
This problem may occur because your OS is 64bit, but the installed package has been searching for Python in the 32bit registry.
StackOverfolow seems to be able to solve the problem, such
2. Solve the second pitfall
The cause of the problem seems to be related to the vc compiler. The specific cause is not detailed. However, after Google/Bing, the conclusion is, A compiler of a specific version is required during the installation process (it seems to be VS 2008), so it won't work even if you have VS 2012/2013/2015...
Download
Microsoft Visual C ++ Compiler for Python 2.7The patch is good, here: http://www.microsoft.com/en-us/download/details.aspx? Id = 44266
After installing the above patch, I enter setup. py install again, and the prompt is still displayed.
Error: Unable to find vcvarsall. bat
However, you can enter pip install numpy in the command line window!
Expose your ignorance... the Python package is actually compiled using the VC compiler ?...
Pip install numpy and find cl in the process...