Python3.4 用 pip 安裝lxml時出現 「Unable to find vcvarsall.bat 」。通常解決方法是安裝Visual Studio 2015。可是爲了安裝這個庫去安裝幾個G的VS明顯不划算。python
先去這裏下載對應版本的MSVC編譯包:ui
Python Version | You will need |
---|---|
3.5 and later | Visual C++ Build Tools 2015 or Visual Studio 2015 |
3.3 and 3.4 | Windows SDK for Windows 7 and .NET 4.0 (Alternatively, Visual Studio 2010 if you have access to it) |
2.6 to 3.2 | Microsoft Visual C++ Compiler for Python 2.7 |
而後去 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 搜索lxml找到對應python版本的whl文件。xml
去下載目錄執行 pip install whl文件名。ip