问题
When I am running
from docx import Document
I am getting error as
ImportError: cannot import name Document
I am working on Python 2.7.
回答1:
It looks like you have installed only docx
, but I tried with this and worked for me:
pip uninstall docx
pip install python-docx
This way you will be using the newest version of the library, hope you find it useful.
来源:https://stackoverflow.com/questions/53674449/importerror-cannot-import-name-document