在使用 Python-docx 库操作Word文档时,需要插入图片,在设置宽高时,报错“NameError: name 'Inches' is not defined”
原因是:没有 导入 Inches 模块
解决方法:
from docx.shared import Inches