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
.
34 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 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”: 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