Windows 10 and Unable to find vcvarsall.bat

Jacobian picture Jacobian · May 30, 2016 · Viewed 26.1k times · Source

When I try to build one package:

C:\Linter\intlib\PYTHON>python setup.py build

I get this error message:

running build

running build_ext

building 'LinPy' extension

error: Unable to find vcvarsall.bat

This is my Python version:

Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)] on win32

And I'm working on Windows 10 x64. I know about this thread and dozens of others (like this and this and the list goes on). So, I guess I tried almost everything, but nothing works. It seems like all those threads have become outdated, so I need some new receipt. BTW. I tried this:

SET VS90COMNTOOLS=%VS100COMNTOOLS%

And this (in Visual Studio 2015 Visual Studio Command Prompt):

set DISTUTILS_USE_SDK=1

I looked for vcvarsall.bat everywhere on my machine, but could not find it.

I investigated this folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools, but it does not contain any .bat files. Anyway, after all my manipulations python setup.py build still raises the very same error. So, I need help. Thanks!

Answer

Ani Menon picture Ani Menon · Jun 4, 2016

The issue is caused because you don't have a compiler installed for the receptive build you are trying to run.


The following is what you may require as per the MS Python Engineering community,

Python Version  |You will need
------------------------------------
3.5 and later   |Visual C++ Build Tools 2015 or Visual Studio 2015
3.3 and 3.4     |Windows SDK for Windows 7 and .NET 4.0
                |(Alternatively, Visual Studio 2010 if you have access to it)
2.6 to 3.2      |Microsoft Visual C++ Compiler for Python 2.7

You will need to install: Windows SDK for Windows 7 and .NET 4.0 or VS 2010


Source: How to deal with the pain of “unable to find vcvarsall.bat”