简体   繁体   中英

Python GObject Introspection for Windows 7

I am trying to use matplotlib in Python but any imports fail with the following error:

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.

The application needs to be able to run on Windows machines. Does anyone have any support on this?

I have found a lot of old threads that say it is impossible to use GTK3 and Python on Windows, but they are at least 2-3 years old. So things might have changed since then.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM