This is because you still have the old broken wrapper installed. The wrapper is provided by linux-tools-common from the main kernel (not realtime). You must upgrade that package as well.
$ apt install linux-tools-common -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2089411 Title: python perf module missing in realtime kernel To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2089411/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs