Installing lxml module in python

后端 未结 7 2106
温柔的废话
温柔的废话 2020-12-02 09:52

while running a python script, I got this error

  from lxml import etree
ImportError: No module named lxml

now I tried to install lxml

7条回答
  •  遥遥无期
    2020-12-02 10:08

    You need to install Python's header files (python-dev package in debian/ubuntu) to compile lxml. As well as libxml2, libxslt, libxml2-dev, and libxslt-dev:

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

提交回复
热议问题