升级到优胜美地后的 Gtk 警告 [英] Gtk warning after ugrading to yosemite
本文介绍了升级到优胜美地后的 Gtk 警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的 mac (Yosemite) 上运行一个用 python 编写的程序.几乎在启动程序后立即出现以下错误:
I am trying to run a program written in python on my mac (Yosemite). Almost immediately after starting the program it gives me the following error:
Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
[edit] 试图隔离问题,输入时出现错误
[edit] tried to isolate the issue, the error appears upon entering
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) 并重新启动.(如类似线程中所列).有谁知道如何解决这个错误?
I have tried reinstalling X11(v2.7.7) and rebooting. (as listed in similar threads). Does anyone know how to resolve this error?
推荐答案
先尝试运行 Xquartz.app.然后:
Try to run Xquartz.app first. Then:
import matplotlib
matplotlib.use('TkAgg')
from matplotlib import pyplot
通常在每次操作系统升级后对我有用.
Generally works for me after each OS upgrade.
这篇关于升级到优胜美地后的 Gtk 警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文