vs2015编辑python_python要在Visual Studio 2015(v 14)中编译缺少vcvarsall.bat

在Windows 10上使用Visual Studio 2015 Ultimate尝试安装numpy时,遇到错误提示找不到vcvarsall.bat。问题在于VS14(VS2015)的VC文件夹中缺失该文件。Python 3.5需要C++编译器来编译一些包,并且需要与编译Python相同的版本。尽管get_build_version()返回14,表示应使用VS2015,但C:Program Files (x86)Microsoft Visual Studio 14.0VC文件夹中却没有vcvarsall.bat。解决方案是确保在Visual Studio 2015中安装了C++通用工具。
摘要由CSDN通过智能技术生成

I am trying to install numpy in python 3.5 under windows 10 with visual studio 2015 ultimate installed.

Short version: file vcvarsall.bat is missing from vs14 folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC folder. Why?

Long version:

Running pip install numpy gives me this error error: Unable to find vcvarsall.bat

researching this error got me to several stackoverflow answers that helped me figure out that python needs c++ compiler to compile some of the packages. And it needs the to do it using the same version of compiler that was used to compile python 3.5 (

error: Unable to find vcvarsall.bat ). My python is compiled using [MSC v.1900 64 bit (AMD64)] - which is vs 14 ( visual studio 2015 )

Moving further with my research i learned out from:

pip install gives error: Unable to find vcvarsall.bat that

get_build_version() from $python_install_prefix/Lib/distutils/msvc9compiler.py returns the version of vs that shoud be used to find the path of vcvarsall.bat

For me this method returns 14. So everything correct.

Now when I look into the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC there file vcvarsall.bat is missing.

But when I look into the folder C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC there is a vcvarsall.bat.

Why is vcvarsall.bat missing from vs 14.0 ??

解决方案

Make sure C++ Common Tools are installed in Visual Studio.

Programs and Features -> VS 2015 -> Change

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值