On Windows 10 I tried to install cx_Freeze with Python 3.5.0 |Anaconda 2.4.0 (64-bit) using:
pip install cx_Freeze
However, I got this error:
error: Unable to find vcvarsall.bat
This is the error and some lines above and below the error:
creating build\lib.win-amd64-3.5\cx_Freeze\samples\zope
copying cx_Freeze\samples\zope\qotd.py -> build\lib.win-amd64-3.5\cx_Freeze\samples\zope
copying cx_Freeze\samples\zope\setup.py -> 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:
and
creating build\lib.win-amd64-3.5\cx_Freeze\samples\zope
copying cx_Freeze\samples\zope\qotd.py -> build\lib.win-amd64-3.5\cx_Freeze\samples\zope
copying cx_Freeze\samples\zope\setup.py -> 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\
I have already installed Microsoft Visual Studio 2013 before I had tried to install cx_Freeze.
I have tried the following ideas I found in the Internet:
I modified the msvc9compiler.py
on line 241 from toolskey = "VS%0.f0COMNTOOLS" % version
to toolskey = "VS120COMNTOOLS"
;
I creat the term HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC
and the new string value(name=productdir, data=the path of 'vcvarsall.bat') under the term.
After trying those ideas I still got the same error.