本文主要是介绍Python安装第三方模块时的“unable to find vcvarsall.bat”,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
节选自微软的《How to deal with the pain of “unable to find vcvarsall.bat”》
https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/
如果你看见“unable to find vcvarsall.bat”的话,意味着你正在安装的包有一个扩展模块,而且只有它的源代码。“vcvarsall.bat”是Visual Studio里编译器的一部分,它是编译这个模块的前提条件。
对于Python3.5及以上的版本,可以安装Visual C++ Build Tools 2015,这个版本的Tools依赖于.Net framework4.5.1以及更高版本,确认你已经安装了这些依赖。
对于Python3.5及以上版本,只需要安装Visual C++ Build Tools 2015或者Visual Studio 2015就可以,接下来再一次运行pip install package即可。
https://wiki.python.org/moin/WindowsCompilers
这篇关于Python安装第三方模块时的“unable to find vcvarsall.bat”的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!