轉自:http://www.leadnt.com/2013/08/pipunable-to-find-vcvarsall-bat%E9%94%99%E8%AF%AF%E8%A7%A3%E5%86%B3/
python 2.7在setup的時候查找的是VS2008編譯的,如果沒有安裝vc2008,則可能報錯。
如果安裝了VS2010可以使用下面的方法解決,命令行輸入:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
如果安了VS2012輸入:
SET VS90COMNTOOLS=%VS110COMNTOOLS%
python 2.7在setup的時候查找的是VS2008編譯的。
For Windows installations: While running setup.py for for package installations Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use newer Visual Studio by setting correct path in VS90COMNTOOLS environment variable before calling
setup.py.