How to install lxml on Ubuntu?

How to install lxml on Ubuntu?

Asked on October 19, 2018 in Python.
Add Comment


  • 4 Answer(s)

    Since you are on Ubuntu, do not hassle with those supply packages. simply install those development packages mistreatment apt-get.

    apt-get install libxml2-dev libxslt1-dev python-dev
    

    If you’re happy with a possibly older version of lxml altogether though, you could try

    apt-get install python-lxml
    

    and be done with it. 

    Answered on October 19, 2018.
    Add Comment

    I also had to install lib32z1-dev before lxml would compile

    sudo apt-get install lib32z1-dev
    

    Or all the mandatory packages together:

    sudo apt-get install libxml2-dev libxslt-dev python-dev lib32z1-dev
    

     

    Answered on October 19, 2018.
    Add Comment

    Since you’re on Ubuntu, don’t bother with those source packages. Just install those development packages using apt-get.

    apt-get install libxml2-dev libxslt1-dev python-dev

    If you’re happy with a possibly older version of lxml altogether though, you could try

    apt-get install python-lxml

    and be done with it.

    Answered on February 12, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.