简体   繁体   中英

Import Warning: Not Importing Directory issues using wxPython, don't know how to fix

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.*')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM