Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

vcvarsall.bat needed for python to compile missing from visual studio 2015 ( v 14)

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.0VC 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.0VC there file vcvarsall.bat is missing.

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

Why is vcvarsall.bat missing from vs 14.0 ??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

Programs and Features -> VS 2015 -> Change

VS2015 setup


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...