Win10: pip install gives error: Unable to find vcvarsall.bat when I want to install cx_Freeze
<p>On Windows 10 I tried to install cx_Freeze with Python 3.5.0 |Anaconda 2.4.0 (64-bit) using:</p>

<pre><code>pip install cx_Freeze
</code></pre>

<p>However, I got this error:</p>

<pre><code> error: Unable to find vcvarsall.bat
</code></pre>

<p>This is the error and some lines above and below the error:</p>

<pre><code> creating build\lib.win-amd64-3.5\cx_Freeze\samples\zope
 copying cx_Freeze\samples\zope\qotd.py -&gt; build\lib.win-amd64-3.5\cx_Freeze\samples\zope
 copying cx_Freeze\samples\zope\setup.py -&gt; build\lib.win-amd64-3.5\cx_Freeze\samples\zope
 running build_ext
 building 'cx_Freeze.util' extension
 error: Unable to find vcvarsall.bat

 ----------------------------------------
 Failed building wheel for cx-Freeze
 Running setup.py clean for cx-Freeze
Failed to build cx-Freeze
Installing collected packages: cx-Freeze
 Running setup.py install for cx-Freeze ... error
 Complete output from command c:\users\rachin_doug\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\RACHIN~1\\AppData\\Local\\Temp\\pip-build-sllgirs1\\cx-Freeze\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\RACHIN~1\AppData\Local\Temp\pip-7d4trlig-record\install-record.txt --single-version-externally-managed --compile:
</code></pre>

<p>and</p>

<pre><code>creating build\lib.win-amd64-3.5\cx_Freeze\samples\zope
copying cx_Freeze\samples\zope\qotd.py -&gt; build\lib.win-amd64-3.5\cx_Freeze\samples\zope
copying cx_Freeze\samples\zope\setup.py -&gt; build\lib.win-amd64-3.5\cx_Freeze\samples\zope
running build_ext
building 'cx_Freeze.util' extension
error: Unable to find vcvarsall.bat

----------------------------------------
Command "c:\users\rachin_doug\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\RACHIN~1\\AppData\\Local\\Temp\\pip-build-sllgirs1\\cx-Freeze\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\RACHIN~1\AppData\Local\Temp\pip-7d4trlig-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\RACHIN~1\AppData\Local\Temp\pip-build-sllgirs1\cx-Freeze\
</code></pre>

<p>I have already installed Microsoft Visual Studio 2013 before I had tried to install cx_Freeze.</p>

<p>I have tried the following ideas I found in the Internet:</p>

<p>I modified the <code>msvc9compiler.py</code> on line 241 from <code>toolskey = "VS%0.f0COMNTOOLS" % version</code> to <code>toolskey = "VS120COMNTOOLS"</code>;</p>

<p>I creat the term <code>HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC</code> and the new string value(name=productdir, data=the path of 'vcvarsall.bat') under the term.</p>

<p>After trying those ideas I still got the same error.</p>

<p>The combination of Python 3.5 and Microsoft Visual Studio 2013 is probably not supported. The compiler requirements are stated in <a href="https://wiki.python.org/moin/WindowsCompilers#Which_Microsoft_Visual_C.2B-.2B-_compiler_to_use_with_a_specific_Python_version_.3F" rel="nofollow">WindowsCompilers page</a>: in the case of python 3.5 Visual C++ version 14.0 (Visual Studio 2015) is needed.</p>

python python-3.x batch-file pip cx-freeze