python报错ModuleNotFoundError: No module named 'docx'解决方案
执行报错
ModuleNotFoundError: No module named ‘docx’
pip install docx 后报错
![在这里插入图片描述](https://img-blog.csdnimg.cn/0e888bf405b34f408d45443e97bd5a09.png)
分析原因
导错包了,不是docx而是python-docx
解决方案
卸载安装错的 docx
pip uninstall docx
安装正确的包 python-docx
pip install python-docx
![在这里插入图片描述](https://img-blog.csdnimg.cn/de41f4616dc3408cad0e23318c2ab12e.png)
出现:Successfully installed python-docx-1.1.0 表示安装成功