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

前端 未结 6 1646
猫巷女王i
猫巷女王i 2020-11-30 00:16

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 fro

6条回答
  •  星月不相逢
    2020-11-30 00:54

    I met this problem when I was trying to build ujson package with python 2.7 (compiled with VS 2015).

    • vcvarsall.bat: try to copy vsvars32.bat (from the same directory - "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools") to vcvarsall.bat. It's all you need for build
    • another problem is detecting VS version in function get_build_version() (distutils/msvc9compiler.py). You need to change this function to return right version of VS.

    There is this line:

    majorVersion = int(s[:-2]) - 6
    

    it sets majorVersion to 13, but the correct version for VS 2015 is 14. So you need add two line, for example:

    if majorVersion == 13:
        majorVersion = 14 
    

提交回复
热议问题