I ran into this problem recently and I found another solution that worked for me. I replaced from wx.lib.pubsub import pub with from pubsub import pub. You may have do a pip install pypubsub to get the needed package. You can find more information here:
https://github.com/schollii/pypubsub/issues/7