合并错误“无法导入:GTK +;没有名为存储库的模块“

合并错误“无法导入:GTK +;没有名为存储库的模块“

问题描述:

Meld以前可以在我的机器上运行(openSuse Linux 13.1,Python 2.7.6),但是在遇到Spyder的麻烦(例如拒绝实际运行任何脚本)之后,我卸载了很多东西,然后慢慢将它们放回原处.再次.

Meld used to work on my machine (openSuse Linux 13.1, Python 2.7.6) but after having trouble with Spyder (like it refusing to actually run any scripts), I uninstalled a large number of things, then slowly brought them back again.

从那时起,meld不再起作用.我不断收到此错误消息

Since then, meld does not work anymore. I keep getting this error message

> meld
Cannot import: GTK+
No module named gi

我能够通过安装gi来解决该问题:

I was able to solve that by installing gi:

> pip install gi

现在,错误被替换为:

> meld
Cannot import: GTK+
No module named repository

...和此处是一个类似的问题,在其中卸载gi显然有帮助?我很困惑.我确实尝试过再次卸载它,但这只是让我回到了先前的错误((!).

... and here is a similar question where uninstalling gi apparently helped? I'm confused. I did try uninstalling it again but that just brought me back to the previous error (duh!).

有什么想法吗?

好的,这并不明显:

gi.repository不是gi的一部分,而是它自己的东西.这就是为什么不应该安装gi的原因(谢谢您

gi.repository is not part of gi but its own thing. That's why gi should not be installed (thank you Moose).

本文然后将我指向可能的来源python-gobject.但是,我已经安装了它.因此,我安装了其他看起来类似的东西,然后python-gobject-cairo包(Python 2.7,openSuse 13.1)成功了.似乎有人忽略了对Meld的依赖...

This article then pointed me to a possible source, python-gobject. However, I already had that installed. So I installed other things that looked similar, and the python-gobject-cairo package ( Python 2.7, openSuse 13.1) did the trick. Seems like someone overlooked a dependency for Meld...