无法使用docx模块:期望

时间:2018-09-03 23:49:43

标签: python-3.x module terminal docx python-docx

在pycharm中:

from docx import Document

这是我得到的错误:

/Users/XYZ/PycharmProjects/XYZ/venv/bin/python "/Users/XYZ/PycharmProjects/XYZ/Intro - Hello World.py"
Traceback (most recent call last):
  File "/Users/XYZ/PycharmProjects/XYZ/Intro - Hello World.py", line 1, in <module>
    from docx import Document
  File "/Users/XYZ/PycharmProjects/XYZ/venv/lib/python3.7/site-packages/docx.py", line 30, in <module>
    from exceptions import PendingDeprecationWarning
ModuleNotFoundError: No module named 'exceptions'

Process finished with exit code 1

当我转到目录->网站软件包-> docx-> 我可以找到文件“ exceptions.py”。我不知道为什么它说它丢失了。

0 个答案:

没有答案