I tried to install the Python package dulwich:
pip install dulwich
But I get a cryptic error message:
error: Unable to find vcvarsall.bat
The same happens if I try installing the package manually:
> python setup.py install running build_ext building 'dulwich._objects' extension error: Unable to find vcvarsall.bat
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.
Update: Comments point out that the instructions here may be dangerous. Consider using the Visual C++ 2008 Express edition or the purpose-built Microsoft Visual C++ Compiler for Python (details) and NOT using the original answer below. Original error message means the required version of Visual C++ is not installed.
For Windows installations:
While running setup.py for package installations, Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS
environment variable before calling setup.py
.
Execute the following command based on the version of Visual Studio installed:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
SET VS90COMNTOOLS=%VS110COMNTOOLS%
SET VS90COMNTOOLS=%VS120COMNTOOLS%
SET VS90COMNTOOLS=%VS140COMNTOOLS%
WARNING: As noted below, this answer is unlikely to work if you are trying to compile python modules.
See Building lxml for Python 2.7 on Windows for details.
I found the solution. I had the exact same problem, and error, installing 'amara'. I had mingw32 installed, but distutils needed to be configured.
C:\programs\mingw\
c:\programs\MinGW\bin;
to the PATH Edit (create if not existing) distutils.cfg file located at C:\Python26\Lib\distutils\distutils.cfg
to be:
[build] compiler=mingw32
Now run easy_install.exe amara
.
Make sure environment is set by opening a new cmd.exe
.
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