我有麻煩理解gi.repository瞭解gi.repository
我用這個敷設渠道在我的代碼
from gi.repository import Gtk
但是,如果我想使用一些組件
我搜索我得到導入錯誤我得到它的一些組件,如GtkSource,Vte,GLib,...
所以我的代碼就像
from gi.repository import Gtk, GtkSource, Vte, GLib
一切工作正常,但如果我想添加matplotlib吸取我的畫布,我得到和錯誤
enter code/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
from gtk import _gtk
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_ascii_strncasecmp: assertion `s2 != NULL' failed
from gtk import _gtk
Segmentation fault (core dumped) here
我怎樣才能得到matplotlib與gi.repository工作?
謝謝
11個月前一個GTK3後端與新的gi.repository導入合併在github中:https://github.com/matplotlib/matplotlib/pull/590我不確定什麼版本有這個或如何調用它,但它*應該*兼容...不幸的是,正如我最近發現的,你不能在同一個應用程序中同時使用兩個導入,它會崩潰(分段錯誤)。 – NoBugs