升级到优胜美地后发出Gtk警告

时间:2014-11-10 09:50:38

标签: pygtk

我正在尝试在我的mac(Yosemite)上运行用python编写的程序。 启动程序后几乎立即出现以下错误:

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

[edit]尝试隔离问题,输入时出现错误

Adriaan$ ipython --gui=gtk
Python 2.7.8 (default, Nov  5 2014, 15:41:54) 
Type "copyright", "credits" or "license" for more information.

IPython 2.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

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

我尝试重新安装X11(v2.7.7)并重新启动。 (如类似线程中所列)。 有谁知道如何解决这个错误?

1 个答案:

答案 0 :(得分:0)

首先尝试运行Xquartz.app。然后:

import matplotlib

matplotlib.use('TkAgg')

from matplotlib import pyplot 

每次操作系统升级后,通常都适用于我。