Windows 10 和无法找到 vcvarsall.bat [英] Windows 10 and Unable to find vcvarsall.bat
问题描述
当我尝试构建一个包时:
When I try to build one package:
C:\Linter\intlib\PYTHON>python setup.py build
我收到此错误消息:
运行构建
运行 build_ext
running build_ext
构建LinPy"扩展
错误:无法找到 vcvarsall.bat
error: Unable to find vcvarsall.bat
这是我的 Python 版本:
This is my Python version:
Python 3.4.4(v3.4.4:737efcadf5a6,2015 年 12 月 20 日,20:20:57)[MSC v.1600 64 位 (AMD64)] 在 win32 上
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 和 this 等等).所以,我想我几乎尝试了所有方法,但没有任何效果.似乎所有这些线程都过时了,所以我需要一些新的收据.顺便提一句.我试过这个:
And I'm working on Windows 10 x64. I know about this thread and dozens of others (like this and this and the list goes on). So, I guess I tried almost everything, but nothing works. It seems like all those threads have become outdated, so I need some new receipt. BTW. I tried this:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
这(在 Visual Studio 2015 Visual Studio 命令提示符中):
And this (in Visual Studio 2015 Visual Studio Command Prompt):
set DISTUTILS_USE_SDK=1
我在我的机器上到处寻找 vcvarsall.bat
,但找不到.
I looked for vcvarsall.bat
everywhere on my machine, but could not find it.
我调查了这个文件夹 C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools
,但它不包含任何 .bat
文件.无论如何,在我所有的操作之后 python setup.py build
仍然会引发同样的错误.所以,我需要帮助.谢谢!
I investigated this folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools
, but it does not contain any .bat
files. Anyway, after all my manipulations python setup.py build
still raises the very same error. So, I need help. Thanks!
推荐答案
导致此问题的原因是您没有为尝试运行的接收构建安装编译器.
The issue is caused because you don't have a compiler installed for the receptive build you are trying to run.
根据 MS Python 工程社区,以下是您可能需要的内容,
The following is what you may require as per the MS Python Engineering community,
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 7 和 .NET 4.0 的 Windows SDK 或 VS 2010
You will need to install: Windows SDK for Windows 7 and .NET 4.0 or VS 2010
这篇关于Windows 10 和无法找到 vcvarsall.bat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!