Installing lxml module in python

后端 未结 7 2149
温柔的废话
温柔的废话 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:06

    Just do:

    sudo apt-get install python-lxml
    

    For Python 2 (e.g., required by Inkscape):

    sudo apt-get install python2-lxml
    

    If you are planning to install from source, then albertov's answer will help. But unless there is a reason, don't, just install it from the repository.

提交回复
热议问题