[英]windows7 64bit python pip install error: Unable to find vcvarsall.bat
I tried all the methods that I can find online and I even dove into the python code it didn't help. 我尝试了所有可以在网上找到的方法,我甚至深入研究了它没有帮助的python代码。
I am using windows 7 64 bit version. 我使用的是Windows 7 64位版本。 I have installed Microsoft VS 2008 and 2012 both.
我已经安装了Microsoft VS 2008和2012。 The Python I installed is 3.5
我安装的Python是3.5
When I run pip install numpy, I am getting error: 当我运行pip install numpy时,我收到错误:
Unable to find vcvarsall.bat
无法找到vcvarsall.bat
The version return by the code in msvc9compiler.py
shows my VS version is 14.0 and I dive into all kinds of windows registry to add a couple of entries(VC and ProdctDir to point to the VS 2008 VC folder). 通过
msvc9compiler.py
中的代码返回的版本显示我的VS版本是14.0,我潜入各种Windows注册表添加几个条目(VC和ProdctDir指向VS 2008 VC文件夹)。 It didn't help. 它没有帮助。 I can run
vcvarsall.bat
from the command line and it runs fine with following result. 我可以从命令行运行
vcvarsall.bat
,它运行正常,结果如下。 Setting environment for using Microsoft Visual Studio 2008 x86 tools. 设置使用Microsoft Visual Studio 2008 x86工具的环境。
I though it works fine. 我虽然工作正常。
Is there anything else I can try? 还有什么我可以尝试的吗? I have spent two days on this.
我花了两天时间。
according to this : https://www.python.org/downloads/release/python-350a1/ python 3.5 is compiled with vs2015. 根据这个: https ://www.python.org/downloads/release/python-350a1/ python 3.5是用vs2015编译的。
if you done want to install vs2015 you can set the enviroment variable VS__COMNTOOLS where __ is the version number of visual studio. 如果你想安装vs2015你可以设置环境变量VS__COMNTOOLS,其中__是visual studio的版本号。 for example in python 2.7 i had to do this in cmd before using pip
例如在python 2.7中我必须在使用pip之前在cmd中执行此操作
SET VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
im not sure but i think the version number of vs2015 is 13 so do 我不确定,但我认为vs2015的版本号是13这样做
SET VS130COMNTOOLS=C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\
or you can do 或者你可以做
SET VS130COMNTOOLS=%VS10COMNTOOLS%
Bonson, Frank, etc. Bonson,Frank等
Re-install or upgrade Visual Studio 2015 Community and make sure you select Visual C++ then proceed. 重新安装或升级Visual Studio 2015社区,并确保选择Visual C ++然后继续。 It worked for me on Windows 7 64bit with Python 3.5.1 which I installed as part of WinPython 3.5.1.2 64bit.
它适用于Windows 7 64bit和Python 3.5.1,我作为WinPython 3.5.1.2 64bit的一部分安装。
See also: vcvarsall.bat needed for python to compile missing from visual studio 2015 ( v 14) 另见: vcvarsall.bat需要python来编译Visual Studio 2015中的遗漏(第14节)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.