解决 Python3.5 用 pip 安装lxml错误

不打扰是莪最后的温柔 提交于 2019-11-28 12:40:57

Python3.4 用 pip 安装lxml时出现 “Unable to find vcvarsall.bat ”。一般解决方法是安装Visual Studio 2015。但是为了安装这个库去安装几个G的VS明显不划算。

先去这里下载对应版本的MSVC编译包:

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文件。

去下载目录执行 pip install whl文件名。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!