Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

18,186

Solution 1

Try this:

pip install lxml==3.6.0

Solution 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.

Share:
18,186
Mohamed Oun
Author by

Mohamed Oun

I'm a CS undergraduate from Egypt, I like watching movies, playing/watching football, video games and some other stuff I forgot.

Updated on June 17, 2022

Comments

  • Mohamed Oun
    Mohamed Oun almost 2 years

    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.

  • m3nda
    m3nda about 7 years
    Sure you can apt-get on a W10 machine.
  • m3nda
    m3nda about 7 years
    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.
  • Intrastellar Explorer
    Intrastellar Explorer about 5 years
    I found this still encountered the same problem :/ Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
  • Ijaz Ur Rahim
    Ijaz Ur Rahim over 4 years
    how can we run apt-get on windows
  • MrEduar
    MrEduar over 2 years
    ERROR: lxml-3.6.4-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.