This package provides a command line tool for routing real-time MIDI events.
You may need to install the PortMidi dynamic lib. In APT on Linux:
$ sudo apt-get install libportmidi-dev
And in Homebrew on OS X:
$ brew install portmidi
Then the easiest way to install midihub is to use pip:
$ pip install git+https://github.com/nanotone/midihub.git