2

a deprecating warning in wxPython lib is as follows: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.

python 3.7.2 and pycharm IDE

Minux
  • 51
  • 1
  • 8

2 Answers2

3

wx.lib.pubsub is now deprecated in wxPython. You will need to install PyPubSub now. The PyPubSub package is actually what wx.lib.pubsub was based on, so the implementation will be almost the same. You can read its documentation here.

To install PyPubSub, use pip:

 pip install PyPubSub

Then replace from wx.lib.pubsub import pub with from pubsub import pub.

Mike Driscoll
  • 32,629
  • 8
  • 45
  • 88
0

Simply change references to wx.lib.pubsub to pubsub
So for example:

# Changing the following line
#from wx.lib.pubsub import pub

# to the line below is all that is required
from pubsub import pub
Rolf of Saxony
  • 21,661
  • 5
  • 39
  • 60
  • @siliconMaigc If this answer or any other one solved your issue, please mark it as accepted (check mark in the top left). Doing this allows focussing on questions with no accepted answers. – kbr85 May 31 '19 at 15:41