ModuleNotFoundError:在Python 3.6中没有名为“ exceptions”的模块

时间:2018-07-16 06:55:04

标签: python windows python-3.6

我为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'

请提出解决方案。

0 个答案:

没有答案