Python package (Numpy) Installation Error in Windows: Unable to find vcvarsall. bat, numpyvcvarsall. bat

Source: Internet
Author: User

Python package (Numpy) Installation Error in Windows: Unable to find vcvarsall. bat, numpyvcvarsall. 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.

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

  1. Decompress the downloaded. ZIP file.
  2. Open the command line and enter the root directory
  3. Input: setup. py install
  4. 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...
  • DownloadMicrosoft 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...

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.