Python-docx插入图片报错“NameError: name 'Inches' is not defined”

在使用 Python-docx 库操作Word文档时,需要插入图片,在设置宽高时,报错“NameError: name 'Inches' is not defined”

原因是:没有 导入 Inches 模块

解决方法:

from docx.shared import Inches
原文地址:https://www.cnblogs.com/shiyixirui/p/14332759.html