Python Windows 7 的 GObject 自省

Python GObject Introspection for Windows 7

我正在尝试在 Python 中使用 matplotlib,但任何导入都失败并出现以下错误:

from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_gtk3cairo.py", line 6, in <module> 
from . import backend_gtk3
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_gtk3.py", line 21, in <module>
    "Gtk3 backend requires the GObject introspection bindings for Gtk 3 "
ImportError: Gtk3 backend requires the GObject introspection bindings for Gtk 3 to be installed.

应用程序需要能够在 Windows 台机器上 运行。有人对此有任何支持吗?

我发现很多老帖子说 GTK3 和 Python 不可能在 Windows 上使用,但它们至少有 2-3 年的历史了。所以从那以后事情可能发生了变化。

通过使用 http://sourceforge.net/projects/pygobjectwin32/files/pygi-aio-3.14.0_rev22-setup.exe 中的 pygi-aio 安装程序并卸载任何其他旧依赖项(GTK2、pygobject 等)解决