在Python 2.7上安装lxml时遇到问题

在Python 2.7上安装lxml时遇到问题,python,lxml,Python,Lxml,我运行命令行安装lxml,但随后它给了我以下错误: C:\Users\username\AppData\Local\Temp\easy_install-y6y867l_\lxml-3.5.0\temp\xmlXPathInit67jlgy6a.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory Could not find function xmlChec

我运行命令行安装lxml,但随后它给了我以下错误:

C:\Users\username\AppData\Local\Temp\easy_install-y6y867l_\lxml-3.5.0\temp\xmlXPathInit67jlgy6a.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory


Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
错误:
安装程序脚本退出,出现错误:命令“C:\\Program Files(x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe”失败,退出状态为2

我也已经安装了MVC。任何帮助都将不胜感激

只需安装,它包含许多库,包括lxml。

运行此命令

set STATICBUILD=true && pip install lxml
这些依赖项将由安装程序下载并一起构建:

libxslt
iconv
zlib
libxml2
或者,您可以从下载.whl文件并通过

pip install lxml‑3.5.0‑cp27‑none‑win32.whl
如果不起作用,检查这个。

希望这有帮助