我为python安装了docx
软件包。
from docx import Document
document = Document('inp.docx')
for p in document.paragraphs:
print(p.text)
运行代码时,它会引发错误
Traceback (most recent call last):
File "cont.py", line 1, in <module>
from docx import Document
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\docx.py", line 30, in <module>
from exceptions import PendingDeprecationWarning
ModuleNotFoundError: No module named 'exceptions'
请提出解决方案。