gtk import Segmentation fault

When I tried to run my program (ModeRator) I get this error:

Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
  from gtk import _gtk
Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk
Segmentation fault (core dumped)

I 'fixed' the problem by disabling the import of matplotlib

It turns out that it is possible to import only one of them:

from gi.repository import GObject, Gtk


import matplotlib.pyplot as plt

Comment out one of these lines end the error is gone! Better explanation of problems like this is found here: http://blog.rabbitvcs.org/archives/312.