Gtk-WARNING **: Locale not supported by C library. while using several Python modules (mayavi, spectral)

℡╲_俬逩灬. 提交于 2019-12-20 02:36:06

问题


I updated my MacBook to Mavericks, reinstalled Macports and all Python 2.7 modules I usually use. While running Python I get the following messages:

when importing mlab:

from mayavi import lab

(process:1146): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale.

when running a mlab command such as mlab.mesh(), the display window opens, shows no content and freezes.

I don't get this message while importing spectral, but I get it when running view_cube() the display window showing the image cube, freezes but shows the data cube. It seems there is something wrong with Xterm, but I can't figure it out. How can I keep the display window from freezing and get rid of the Gtk-WARNING?

I checked locale and locale -a, but couldn't see anything unusual: locale:

locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=


回答1:


While using OS X Mavericks one has to use: ipython --pylab=wx instead of ipython --pylab=osx to avoid crashing the X11 window. I don't know why this works.



来源:https://stackoverflow.com/questions/20366533/gtk-warning-locale-not-supported-by-c-library-while-using-several-python-mo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!