Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 64-bit Windows 7 setup on my PC.

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

like image 382
Umanda Avatar asked Apr 24 '15 11:04

Umanda


People also ask

How do I fix Microsoft Visual C++ 14.0 is required error?

To Solve error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools” You just need to Install Microsoft Visual C++ 14.0. First of all just download Visual C++ 2015 Build Tools from given link. And That will install Visual C++ 14.0 without installing Visual Studio.

How do I install Microsoft Visual C++?

The Redistributable is available in the my.visualstudio.com Downloads section as Visual C++ Redistributable for Visual Studio 2019 - Version 16.7. Use the Search box to find this version. To download the files, select the platform and language you need, and then choose the Download button.


1 Answers

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 LanguagesC++ 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": http://landinghub.visualstudio.com/visual-cpp-build-tools

New working link.

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

pip install --upgrade setuptools 
like image 172
davidsheldon Avatar answered Oct 05 '22 11:10

davidsheldon