Ask coding questions

← Back to all posts
Python - Word Document with docx
TobiasWagner (0)

Hello there,
I tried to use the Library docx together with the given example. But I just get the following error:

Traceback (most recent call last):
File "python", line 1, in <module>
ModuleNotFoundError: No module named 'exceptions'

What is missing to be able to use the Library? Or is there another way to create Word Documents in Python which also works in


Thanks for your Help!
Lord Tkay

Answered by PYer (3394) [earned 5 cycles]
View Answer
PYer (3394)

Just a question, why did you say "Greetings, Lord Tkay"?

pyelias (1558)

Add a requirements.txt file, and put python-docx in it, along with any other external libraries you need.