Difficulty Installing python-rtmidi on Mac OS 10.15.2

I am having difficulty properly installing python-rtmidi for MIDI message functionality. I have installed and uninstalled Python 3.8 multiple times; even tried Python 3.7 prior to the terminal command

sudo pip install python-rtmidi

I always get the error seen in the screenshot when I try to list the MIDI devices. Any ideas?

Could you paste the output of sudo pip install python-rtmidi --upgrade ?

Sometimes when both python 2 and 3 are available you need to write pip3 instead of pip. Another way to ensure you’re installing the package for the right python version is to run /path/to/python3 -m pip install python-rtmidi