我不知道为什么会出现此错误:
导入模块,您可以看到其导入成功
但是当在显示错误的代码中实现
如果该模块不存在,那么它将在终端上不可见
from docx import Document
from docx.shared import Inches
from docx.shared import Cm
from docx.enum.table import *
# from docx.enum.table import WD_ROW_HEIGHT_RULE
table = document.add_table(rows=1, cols=2)
table.style = 'Medium Shading 1 Accent 2'
table.rows[0].height_rule = WD_ROW_HEIGHT_RULE.EXACTLY
#rest of my rows & column code here