我该如何改正这个错误?Gtk-WARNING **: GModule…初始化检查失败:GLib版本太旧(微错配)

时间:2022-06-03 23:08:23

I'm writing a python program with matplotlib, and I'm getting this error:

我用matplotlib编写了一个python程序,我得到了这个错误:

GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

glib - gio消息:使用“内存”GSettings后端。您的设置将不会被保存或与其他应用程序共享。

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib >version too old (micro mismatch)

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2. 10.0/immodule /imm - ibusso)初始化检查失败:GLib >版本太旧(微错配)

(python:6304): Gtk-WARNING **: Loading IM context type 'ibus' failed

(python:6304): gtk警告**:加载IM上下文类型“ibus”失败。

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2. 10.0/immodule /imm - ibusso)初始化检查失败:GLib版本太旧(微错配)

(python:6304): Gtk-WARNING **: Loading IM context type 'ibus' failed

(python:6304): gtk警告**:加载IM上下文类型“ibus”失败。

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2. 10.0/immodule /imm - ibusso)初始化检查失败:GLib版本太旧(微错配)

(python:6304): Gtk-WARNING **: Loading IM context type 'ibus' failed

(python:6304): gtk警告**:加载IM上下文类型“ibus”失败。

The program finishes executing, but the error won't go away. I'm running Ubuntu 16.

程序执行完毕,但错误不会消失。我运行Ubuntu 16。

I tried reinstalling Glib, but nothing changed. I searched for help online, but couldn't find a solution. I'm a noob and I have no clue how to resolve this.

我尝试重新安装Glib,但没有任何改变。我在网上寻找帮助,但找不到解决办法。我是一个新手,我不知道如何解决这个问题。

Can anyone help me out? I really appreciate your time!

有人能帮帮我吗?非常感谢您的时间!

1 个解决方案

#1


-1  

For others (like me) using the Anaconda Python distribution:

对于其他人(如我)使用蟒蛇的分布:

I had the same exact same GTK error messages, despite not having PyGTK installed or in use, in the qt console of Spyder. This began right after I installed a non-default package that automatically downgraded my PyQt version from 5 to 4. I removed it and upgraded the pyqt package, which returned spyder to its normal behavior. I do not know why modifying the pyqt version leads to GTK errors.

我有相同的GTK错误消息,尽管没有安装或使用PyGTK,在Spyder的qt控制台。这是在我安装了一个非默认的包之后开始的,它自动将PyQt版本从5降级为4。我删除了它,并升级了pyqt包,这使spyder恢复了正常的行为。我不知道为什么修改pyqt版本会导致GTK错误。

Note I used anaconda-navigator for the install / uninstall / ugrade steps, but all of this can be achieved through the usual conda command interface. Also, pyqtgraph was the offending library, but the latest version (0.10) installed via pip install pyqtgraph doesn't lead to this issue.

注意,我使用了anaconda-navigator来安装/卸载/ ugrade步骤,但是所有这些都可以通过通常的conda命令接口实现。另外,pyqtgraph是违规的库,但是通过pip安装pyqtgraph安装的最新版本(0.10)不会导致这个问题。

#1


-1  

For others (like me) using the Anaconda Python distribution:

对于其他人(如我)使用蟒蛇的分布:

I had the same exact same GTK error messages, despite not having PyGTK installed or in use, in the qt console of Spyder. This began right after I installed a non-default package that automatically downgraded my PyQt version from 5 to 4. I removed it and upgraded the pyqt package, which returned spyder to its normal behavior. I do not know why modifying the pyqt version leads to GTK errors.

我有相同的GTK错误消息,尽管没有安装或使用PyGTK,在Spyder的qt控制台。这是在我安装了一个非默认的包之后开始的,它自动将PyQt版本从5降级为4。我删除了它,并升级了pyqt包,这使spyder恢复了正常的行为。我不知道为什么修改pyqt版本会导致GTK错误。

Note I used anaconda-navigator for the install / uninstall / ugrade steps, but all of this can be achieved through the usual conda command interface. Also, pyqtgraph was the offending library, but the latest version (0.10) installed via pip install pyqtgraph doesn't lead to this issue.

注意,我使用了anaconda-navigator来安装/卸载/ ugrade步骤,但是所有这些都可以通过通常的conda命令接口实现。另外,pyqtgraph是违规的库,但是通过pip安装pyqtgraph安装的最新版本(0.10)不会导致这个问题。