python - Windows 10 和无法找到 vcvarsall.bat

标签 python windows visual-studio-2010 python-3.4

当我尝试构建一个包时:

C:\Linter\intlib\PYTHON>python setup.py build

我收到此错误消息:

running build

running build_ext

building 'LinPy' extension

error: Unable to find vcvarsall.bat

这是我的 Python 版本:

Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)] on win32

我在 Windows 10 x64 上工作。我知道 this线程和其他几十个(如 thisthis 等等)。所以,我想我几乎尝试了一切,但没有任何效果。似乎所有这些线程都已过时,所以我需要一些新收据。顺便提一句。我试过这个:

SET VS90COMNTOOLS=%VS100COMNTOOLS%

还有这个(在 Visual Studio 2015 Visual Studio 命令提示符中):

set DISTUTILS_USE_SDK=1

我在我的机器上到处寻找 vcvarsall.bat,但找不到。

我调查了这个文件夹 C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools,但它不包含任何 .bat 文件。无论如何,在我进行了所有操作之后 python setup.py build 仍然会引发完全相同的错误。所以,我需要帮助。谢谢!

最佳答案

这个问题是因为您没有为您尝试运行的接受构建安装编译器。


根据 MS Python 工程社区,以下是您可能需要的内容,

Python Version  |You will need
------------------------------------
3.5 and later   |Visual C++ Build Tools 2015 or Visual Studio 2015
3.3 and 3.4     |Windows SDK for Windows 7 and .NET 4.0
                |(Alternatively, Visual Studio 2010 if you have access to it)
2.6 to 3.2      |Microsoft Visual C++ Compiler for Python 2.7

您需要安装:Windows SDK for Windows 7 and .NET 4.0或 VS 2010


来源:How to deal with the pain of “unable to find vcvarsall.bat”

关于python - Windows 10 和无法找到 vcvarsall.bat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37534000/

相关文章:

java - 在java中读取进程的实时输出

python - 带有 Pandas pivot_table 的嵌套小计 'All' 行

python - 如何在不改变数据帧核心的情况下重新采样数据帧?

c++ - 如何确定 Windows 7 x64 上的应用程序文件路径?

c# - 在使用 TFS SDK checkin 文件之前如何预测/获取下一个 ChangeSetId

asp.net-mvc - 为什么 Visual Studio 代码格式不能正常用于 Razor 标记?

c++ - 传递数组作为引用

python - 如何调整绘图表达面积图大小?

python - 如何在 Jenkins 作业中启动 Window exe 文件

c++ - 错误 C2664 : 'callToPrint' : cannot convert parameter 1 from 'std::wstring' to 'LPTSTR'