I installed a new module and it appears as if one of its dependencies was not already installed. The module is called Xlib.display. Here is the error message I received:
Below worked for me!
pip install python3_xlib
I have also used pyuserinput for automation which requires this.