Error in installing Python package (Numpy) under Windows: unable to find Vcvarsall.bat

Source: Internet
Author: User

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.

    1. Windows 7 64bit
    2. Python 2.7
    3. 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)

    1. Unzip the downloaded. zip
    2. Open the command line and go to the root directory
    3. Input: setup.py Install
    4. 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

Related Article

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.