Gtk-WARNING **:C库不支持区域设置。同时使用几个Python模块(mayavi,光谱) [英] Gtk-WARNING **: Locale not supported by C library. while using several Python modules (mayavi, spectral)

查看:150
本文介绍了Gtk-WARNING **:C库不支持区域设置。同时使用几个Python模块(mayavi,光谱)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将MacBook更新为Mavericks,重新安装了Macports以及我通常使用的所有Python 2.7模块。在运行Python时,我收到以下消息:



导入mlab时:



from mayavi import lab



(process:1146):Gtk-WARNING **:C库不支持的语言环境。
使用回退'C'语言环境



运行mlab命令(例如mlab.mesh())时,显示窗口打开,显示没有内容并冻结。



运行 view_cube()时,我没有收到此消息。 / code>显示图像立方体的显示窗口冻结但显示数据立方体。似乎Xterm有问题,但我无法弄清楚。我怎样才能防止显示窗口冻结并摆脱Gtk-WARNING?



我检查了locale并且 locale -a
$ p $ locale



LANG =

LC_COLLATE =C

LC_CTYPE =C

LC_MESSAGES =C

LC_MONETARY =C

LC_NUMERIC =C

LC_TIME =C

LC_ALL =

解决方案

使用OS X Mavericks时,必须使用: ipython --pylab = wx ipython --pylab = osx 避免崩溃X11窗口。我不知道这是为什么起作用。

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=

解决方案

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.

这篇关于Gtk-WARNING **:C库不支持区域设置。同时使用几个Python模块(mayavi,光谱)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆