Sep-18-2021, 11:15 PM
(Sep-18-2021, 09:13 PM)bowlofred Wrote: It's not that it's not installed, it's that it's imported as Document, so the name docx can't be used here.It's not installed as it fail on
docx
before import of Document.So the library is python-docx install is
pip install python-docx
If i copy his first line as i do have it installed.
>>> from docx import Document >>> >>> help(Document) Help on function Document in module docx.api: Document(docx=None) Return a |Document| object loaded from *docx*, where *docx* can be either a path to a ``.docx`` file (a string) or a file-like object. If *docx* is missing or ``None``, the built-in default document "template" is loaded.