Tuesday 29 March 2016

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

This error implies that you do not have the necessary compiler installed on your computer - in order to quickly find out the relevant compiler we need we can run the following from the python interpreter:
import sys
print (sys.version)
My output was something like:
3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)]
We are interested in the MSC version (the version of compiler that compiled the python interpreter) - in this case it's v.1900 - with some quick googling we can soon tell that is Visual C++ 2015.

So we should download Visual Studio 2015, click 'Custom Install' and also ensure that 'Common Tools' is selected in the drop down window under Visual C++ e.g.:


Finally restart the cmd window and attempt to install your package again with pip.

0 comments:

Post a Comment