Missing compiler_cxx fix for MSVCCompiler

来源:互联网 发布:淘宝店铺商品搜不到 编辑:程序博客网 时间:2024/06/06 20:11

        我安装的python版本是2.7,log完整提示:

No module named msvccompiler in numpy.distutils; trying from distutilsMissing compiler_cxx fix for MSVCCompiler

        这种情况是python没有找到VC编译器,python2.7默认要找VC++2008的库,不过这里让python去找VC++2010的路径。

        第一步:找到路径D:\Python27\Lib\distutils(具体路径依据自己选择),删除msvc9compiler.pyc(注意备份),然后编辑msvc9compiler.py文件,将第243行改为

toolskey = "VS100COMNTOOLS"

        第二步:查看环境变量中的系统变量模块,其中的一个变量名为VS100COMNTOOLS。

如果前后有%号(%VS100COMNTOOLS%),则将其改为VS100COMNTOOLS;或者在第一步中对应改为

toolskey = "%VS100COMNTOOLS%"

参考链接:

http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat

http://imsilence.github.io/2015/09/14/python/3rd_windows_install/

http://blog.csdn.net/secretx/article/details/17472107


0 0