后浪云Python教程:python3导入docx出错怎么解决?
在Python3中导入docx会出现下面的错误:
>File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/docx-0.2.4-py3.3.egg/docx.py", line 30, in <module> from exceptions import PendingDeprecationWarning ImportError: No module named 'exceptions'
出现错误的原因:
安装docx库时使用pip install docx命令安装。
解决方法:
在python3中安装docx时使用下面的命令:
pip install python-docx
版权声明:
作者:后浪云
链接:https://www.idc.net/help/183291/
文章版权归作者所有,未经允许请勿转载。
THE END