'docx module import error in terminal in python3.10

I wanted to use docx module in my program. I imported it by doing

pip install --user python-docx

Everything should work fine but when I import it in the interactive shell or try to run any code containing this module i get this error:

ImportError: cannot import name 'Sequence' from 'collections' 

I've seen many questions here about this but none of the answers helped me. I also should point out that I'm on macOS.



Solution 1:[1]

Can you try running this:

pip install --upgrade dbus-python

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohamed Thabet Ben Aicha