Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How to solve Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) error ?

I've installed Python 3.5 and while running

pip install mysql-python

it gives me the following error

error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)

I have added the following lines to my Path

C:\Program Files\Python 3.5\Scripts\;
C:\Program Files\Python 3.5\;

C:\Windows\System32;
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC;
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC

I have a 64bit win 7 setup in my PC.

What could be the solution for mitigating this error and installing the modules correctly via pip.
by

2 Answers

aashaykumar
Your path only lists Visual Studio 11 and 12, it wants 14, which is Visual Studio 2015. If you install that, and remember to tick the box for Languages->C++ then it should work.

On my Python 3.5 install, the error message was a little more useful, and included the URL to get it from

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":

Edit: New working link

Edit: As suggested by Lightfire228, you may also need to upgrade setuptools package for the error to disappear:

pip install --upgrade setuptools
sandhya6gczb
use the binary-only option for pip. For example, for mysqlclient:
 pip install --only-binary :all: mysqlclient 

Login / Signup to Answer the Question.