需要 Microsoft Visual C++ 14.0(无法找到 vcvarsall.bat) [英] Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
问题描述
我已经安装了 Python 3.5 并且正在运行
I've installed Python 3.5 and while running
pip install mysql-python
它给了我以下错误
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
我的电脑上有一个 64 位的 win 7 设置.
I have a 64bit win 7 setup in my PC.
缓解此错误并通过 pip
正确安装模块的解决方案是什么.
What could be the solution for mitigating this error and installing the modules correctly via pip
.
推荐答案
你的路径只列出了 Visual Studio 11 和 12,它要 14,也就是 Visual Studio 2015.如果您安装了它,并记得勾选 Languages->C++
框,那么它应该可以工作.
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.
在我的 Python 3.5 安装中,错误消息更有用一些,并包含从中获取它的 URL
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
新工作 link
根据 Lightfire228 的建议,您可能还需要升级 setuptools
包以消除错误:
As suggested by Lightfire228, you may also need to upgrade setuptools
package for the error to disappear:
pip install --upgrade setuptools
这篇关于需要 Microsoft Visual C++ 14.0(无法找到 vcvarsall.bat)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!