Scenario Description:
Prompt when installing Python2.7 numpy expansion pack in Windows environment:error:unable to find Vcvarsall.bat
After unremitting google/bing, it is found that this is not only the case when installing numpy, but this can also occur when installing other Python packages.
- Windows 7 64bit
- Python 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 pit: Download the numpy binary installation package that says "Python version 2.7 required, which was wasn't found in the registry." As shown in error 1:
The second pit: helpless can only download the source code itself compiled! Download source code (HTTP://SOURCEFORGE.NET/PROJECTS/NUMPY/FILES/NUMPY/1.9.2/NUMPY-1.9.2.ZIP)
- Unzip the downloaded. zip
- Open the command line and go to the root directory
- Input: setup.py Install
- Last hint:error:unable to find Vcvarsall.bat
Solution:
The two pits mentioned above can be resolved to allow the package to be installed properly.
1. Settlement of the first pit (here only provides ideas, not specifically introduced)
- This problem may occur because your OS is 64bit, but the installed package has been looking for Python in the 32bit registry
- Stackoverfolow the answer seems to be solved, such as: http://stackoverflow.com/questions/3652625/ Installing-setuptools-on-64-bit-windows, I'm not going to go into this.
2. Settlement of the second pit
- This causes the problem seems to be related to the VC compiler, the specific reason is not scrutiny, but after google/bing, the conclusion is that the installation process requires a specific version of the compiler (seemingly vs 2008), so even if you have a vs 2012/2013/2015 ...
- Download a Microsoft Visual C + + Compiler for Python 2.7 patch just fine, here: http://www.microsoft.com/en-us/download/ details.aspx?id=44266
- After installing the above patch, I re-enter: setup.py install, still prompt me error:unable to find Vcvarsall.bat
- However, at this point directly in the Command Line window input: Pip install NumPy unexpectedly can!
Spit a slot to expose your ignorance ... Python's package is compiled with VC compiler? ...
Pip install NumPy After the discovery process has CL ...
Error installing Python package (Numpy) under Windows: Unable to find Vcvarsall.bat