Meld error “Cannot import: GTK+; No module named repository”

匿名 (未验证) 提交于 2019-12-03 02:33:02

问题:

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.

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

> meld Cannot import: GTK+ No module named gi 

I was able to solve that by installing gi:

> pip install gi 

Now the error is replaced by:

> meld Cannot import: GTK+ No module named repository 

... 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!).

Any ideas?

回答1:

OK, that was not obvious:

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

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...



回答2:

I unlinked the file that was showing in Expected in:

Expected in: /Applications/Meld.app/Contents/Frameworks/libz.1.dylib

unlink /Applications/Meld.app/Contents/Frameworks/libz.1.dylib 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!