Monday, July 25, 2016

Python 3.5: pip install error: Unable to find vcvarsall.bat

* Windows 7
* Python 3.5.2

I was trying to install cx_Freeze
pip install cx_freeze

It failed with the following error:
    creating build\lib.win32-3.5\cx_Freeze\samples\zope
    copying cx_Freeze\samples\zope\ -> build\lib.win32-3.5\cx_Freeze\samples\zope
    copying cx_Freeze\samples\zope\ -> build\lib.win32-3.5\cx_Freeze\samples\zope
    running build_ext
    building 'cx_Freeze.util' extension
    error: Unable to find vcvarsall.bat

Apparently, this "unable to find vcvarsall.bat" is a well known issue...Luckily, Steve Dower from Microsoft has posted a solution for us.

For Python 3.5 and later, install Visual C++ Build Tools 2015
For Python 3.3 and 3.4, install Windows SDK for Windows 7 and .NET 4.0
For Python 2.6 to 3.2, install Microsoft Visual C++ Compiler for Python 2.7 

How to deal with the pain of “unable to find vcvarsall.bat” – Python Engineering at Microsoft
Python 3.4, Windows 10 and Unable to find vcvarsall.bat - Stack Overflow
visual studio - Unable to find vcvarsall.bat using Python 3.3 in Windows 8 - Stack Overflow
windows - What version of Visual Studio is Python on my computer compiled with? - Stack Overflow
python - error: Unable to find vcvarsall.bat - Stack Overflow

No comments: