I am working on Vista, and using Python 2.6.4. I am using a software that utilizes a Python script, but bumped into the message:
cannot find vcvarsall.bat
So, I installed visual c++ 2010. Still the file is not found - though, it is there. My guess (a very uneducated one...) is that somewhere the path is wrong, because I also have an old visual 2008 (pretty empty) folder. I have no idea where to make the changes for the new path. Do I change something in the registry or in the script? Or somewhere else?
When you see “unable to find vcvarsall. bat”, it means you're installing a package that has an extension module, but only the source code. “vcvarsall. bat” is part of the compiler in Visual Studio that is necessary to compile the module.
To access these command prompts on Windows, on the Start menu, open the folder for your version of Visual Studio, and then choose one of the x64 native or cross-tool developer command prompts.
It seems that Python is looking explicitly for Visual Studio 2008. I encountered this problem where it couldn't find vcvarsall.bat even though it was on the path.
It turns out that Visual Studio 2010 creates the following environment variable:
SET VS100COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
The fix is to create a variable called VS90COMNTOOLS
and have that point to your Visual Studio 2010 common tools folder, e.g.
SET VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
That fixed it for me and I can now build packages using the Visual Studio 2010 compiler.
You can also set the VS90 environment variable to point to the VS100 environment variable using the command below:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With