0

I ran the command line to install lxml but then it gave me this error:

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?

Error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

I also have MVC intstalled already. Any help would be greatly appreciated!

Bista
  • 7,869
  • 3
  • 27
  • 55
mjultra
  • 1
  • 1

2 Answers2

0

Just install Anaconda, It contains many libraries, including lxml.

宏杰李
  • 11,820
  • 2
  • 28
  • 35
0

Run this

set STATICBUILD=true && pip install lxml

And these dependencies will be downloaded and build together by the installer:

libxslt
iconv
zlib
libxml2

Or you can download the .whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and install it by

pip install lxml‑3.5.0‑cp27‑none‑win32.whl

If it doesn't work,check this. lxml-install-on-windows-7-using-pip-and-python-2-7

Hope this helps.

Community
  • 1
  • 1
McGrady
  • 10,869
  • 13
  • 47
  • 69