4

so I'm on Python 3.5.2, I'm trying to install scrapy, it throws an error saying

Failed building wheel for lxml
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

So I try installing lxml, it throws the same error. I try installing it from Here, it says:

Could not find a version that satisfies the requirement lxml-3.6.4-cp35-cp35m-win32 (from versions: ) No matching distribution found for lxml-3.6.4-cp35-cp35m-win32

I can install almost nothing with pip. I'm on a Windows 10 machine. Note that it works flawlessly on my ubunto machine.

Mohamed Oun
  • 561
  • 1
  • 9
  • 24
  • Possible duplicate of [Getting "Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?" when installing lxml through pip](https://stackoverflow.com/questions/33785755/getting-could-not-find-function-xmlcheckversion-in-library-libxml2-is-libxml2) – Stevoisiak Feb 13 '18 at 15:38

3 Answers3

3

Try this:

pip install lxml==3.6.0

dKen
  • 3,078
  • 1
  • 28
  • 37
Ahmed Saad
  • 144
  • 4
2

I tried sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev and that seems to resolve the issue I had.

Jeff Silverman
  • 692
  • 1
  • 8
  • 15
0

MS Windows 10 Pro 64-bit build 1607

pip3 install lxml-3.6.4-cp35-cp35m-win_amd64.whl

works in my case

  • I am facing same problem with libxml2 (for mtmproxy install), and even if i've installed the libxml2-python along lxml (this works) i always get that error. I should give a try to Python3 :-/ A difference between you and the asker, is the arch x64 vs x86. I don't think that the Windows build should do that much difference. – m3nda Jan 27 '17 at 21:13
  • `ERROR: lxml-3.6.4-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.` – MrEduar Oct 02 '21 at 20:50