When import docx in python3.3 I have error ImportError: No module named 'exceptions'

user3472559 picture user3472559 · Mar 31, 2014 · Viewed 73.7k times · Source

when I import docx I have this error:

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

How to fix this error (python3.3, docx 0.2.4)?

Answer

Arun picture Arun · May 29, 2017

If you are using python 3x don't do pip install docx instead go for

pip install python-docx 

It is compatible with python 3.x

Official Documentation available here: https://pypi.org/project/python-docx/