I am trying to install numpy in python 3.5 under windows 10 with visual studio 2015 ultimate installed.
Short version: file vcvarsall.bat
is missing from vs14 folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
folder. Why?
Long version:
Running pip install numpy
gives me this error error: Unable to find vcvarsall.bat
researching this error got me to several stackoverflow answers that helped me figure out that python needs c++ compiler to compile some of the packages. And it needs the to do it using the same version of compiler that was used to compile python 3.5 ( error: Unable to find vcvarsall.bat ). My python is compiled using [MSC v.1900 64 bit (AMD64)] - which is vs 14 ( visual studio 2015 )
Moving further with my research i learned out from:
pip install gives error: Unable to find vcvarsall.bat that
get_build_version()
from $python_install_prefix/Lib/distutils/msvc9compiler.py
returns the version of vs that shoud be used to find the path of vcvarsall.bat
For me this method returns 14. So everything correct.
Now when I look into the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
there file vcvarsall.bat is missing.
But when I look into the folder C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
there is a vcvarsall.bat.
Why is vcvarsall.bat missing from vs 14.0 ??
While installing any Python 2.7 module if you are facing the error:
Windows OS Solution
The easiest solution would be to:
http://aka.ms/vcpython27
Details:
I've come across this problem before when trying to install numpy. Although I was unable to fix the 'vcvarsall.bat' problem, I found that i could download pre compiled libraries from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ Download the libraries you want, navigate to wherever the downloaded .whl files are and open a command prompt window. run 'pip install [whl file name]' This will install the library for you with no compile issue.
I met this problem when I was trying to build ujson package with python 2.7 (compiled with VS 2015).
There is this line:
it sets majorVersion to 13, but the correct version for VS 2015 is 14. So you need add two line, for example:
Make sure C++ Common Tools are installed in Visual Studio.
Programs and Features -> VS 2015 -> Change
I downloaded the Microsoft Visual C++ build Tools Link Here and everything worked great.
I just had the same problem (Windows 7, Python 3.4, pip 7.1)
I followed these instructions: https://www.linkedin.com/pulse/resolving-python-error-unable-find-vcvarsallbat-bhanu-pratap-singh/
Then upgraded pip to 9.0.1 with
tried again:
and voilà: