The midi library must be compatible, there's no earthly reason why it wouldn't be. So I suspect it's something else afoot.
On your Pi 2 setup, what happens if you type:
pip freeze | grep midi
Versus on your Pi 2.
It might be a conflicting midi package, like python-midi, installed which also uses the "midi" module name. So the fix might be:
sudo pip uninstall python-midi
Edit: @RogueM beat me to it :D Above speculative debugging left in for posterity. And just in case it's somehow useful.