This library uses mido: http://mido.readthedocs.io/en/latest/installing.html. pip install mido pip install python-rtmidi