How to Solve NameError: name 'Inches' is not defined -- docx

Solution: Import the 'Inches' module

To Solve the error, add the following line to the top of your code.

from docx.shared import Inches

 

For more information:
Python docx Inches