標籤:
轉自:http://www.douban.com/note/361230278/?type=like
參考:http://my.oschina.net/zhangdapeng89/blog/54407 評論
- Python 2.7 會搜尋 Visual Studio 2008.
如果你電腦上沒有這個版本的話,比如只有:
1.Visual Studio 2010,在cmd裡面執行:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
2. Visual Studio 2012 的話:
SET VS90COMNTOOLS=%VS110COMNTOOLS%
然後就可以正常了
- 如果安裝了VS2010或是VS2012可以使用下面的方法解決:
If you have Visual Studio 2010 installed, execute >
SET VS90COMNTOOLS=%VS100COMNTOOLS%
or with Visual Studio 2012 installed >
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.
原文連結:http://i.xlanlab.com/2793.html
轉:python—解決“Unable to find vcvarsall.bat”錯誤