python-docx库的安装 命令行窗口下输入下面代码 pip install python-docx -i https://pypi.tuna.tsinghua.edu.cn/simple –> 输出结果为: python-docx库的导入 不需要使用全称,直接使用下面代码就可以了 import docx 检验是否导入成功 Word文档结构 Documeent: