- 问题
import docx时,
由from exceptions import PendingDeprecationWarning
引起ModuleNotFoundError: No module named ‘exceptions’ - 解决方式
由于Python3已经取消了这个模块,而 PendingDeprecationWarning 是内置,所以可以直接使用。故注释掉from exceptions import PendingDeprecationWarning
- 2020-07-01 补充
发傻了,直接使用docx的新版本python-docx 0.8.10就行了。