I keep getting this warning every time I use wxPython:
Warning (from warnings module):
File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 14581
import locale
ImportWarning: Not importing directory '/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/locale': missing __init__.py
How do I fix this? I'm using wxPython on Mac.
It is just a warning; there is no need to fix anything here. You could suppress the warning, perhaps. But it is up to the wxPython project to properly silence that warning.
To suppress the warning, you can use the warnings module:
import warnings
warnings.filterwarnings('ignore', message='Not importing directory .*', module='wx.*')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With