Missing lxml module in python?

2019-05-25 16:34发布

问题:

I want o use Python-docx library to process word files. A docx.py references lxml, as i assume from

from lxml import etree

When i start the script, i get error:

No module named lxml

Is this a standard library? Why is not it referenced properly then? IronPython 2.7 RC1.

回答1:

You need to install lxml which is not part of the stdlib. I don't know if it will work with IronPython though.

Update: Seems like it might be non-trivial to get lxml working with IronPython. See this question:

  • How to get lxml working under IronPython?