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