Unable to find VCVarsall.bat using Python 2.7
Solution 1
In order to compile certain Python 2.7 components you need a c compiler installed. The compiler expected when looking for VCVarsAll is Microsoft Visual C++. Microsoft has released a redistributable of the C++ Compiler for use with Python 2.7 that can be retrieved from the following link.
Solution 2
I had the same problem as you and, as explained here, for Python 2.7 you should use the 3.5 version of the Windows SDK which comes with a C compiler.
After installing you have to call the SetEnv.Cmd
script that will to all the trick with the environment variables. I call it with SetEnv /x64 /release
, but you should check for aditional flags.
I had a problem with my version (German) of Windows 7 and the SetEnv.Cmd
was not working properly. This is because the variable names were wrapped between !!
(exclamation marks) instead of %%
(percentage symbols). I just replaced them manually and it worked fine...
Prag Rao
I am An Hobbiest In Embedded Field. FormallY A C++ TEster
Updated on June 04, 2022Comments
-
Prag Rao almost 2 years
I am working with win 7. Installed Python 2.7. I am trying to setup the source code downloaded from "http://effbot.org/downloads#tkinter3000" tkinter3000-1.0-20031212.zip [57k] it throws this error:
G:\Python\tkinter3000-1.0-20031212>python setup.py install using Tcl/Tk libraries at C:\Python27\Tcl using Tcl/Tk version 8.5 running install running build running build_py creating build creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\WCK copying WCK\Utils.py -> build\lib.win-amd64-2.7\WCK copying WCK\wckTkinter.py -> build\lib.win-amd64-2.7\WCK copying WCK\__init__.py -> build\lib.win-amd64-2.7\WCK creating build\lib.win-amd64-2.7\tk3 copying tk3\__init__.py -> build\lib.win-amd64-2.7\tk3 running build_ext building '_tk3draw' extension error: Unable to find vcvarsall.bat
I don't have visual studio. Please suggest a workaround to move ahead.
-
worldofjr over 9 yearsWhile this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
-
Chris Wilcox about 9 yearsThanks for the feedback. While this link is a redirect that my team maintains, I will elaborate on the answer here to make sure there is no confusion in the future.
-
bignano over 8 yearsload setuptools by doing command "pip install --upgrade setuptools"