我试图在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机器上运行。有人支持这件事吗?
我发现了很多旧的线程,它们说在Windows上不可能使用GTK3和Python,但它们至少有2-3年的历史。所以从那以后事情可能就变了。
发布于 2015-11-04 12:32:09
通过从http://sourceforge.net/projects/pygobjectwin32/files/pygi-aio-3.14.0_rev22-setup.exe中使用pygi-aio安装程序并卸载任何其他旧的依赖项(GTK2、pygobject等)来解决问题。
https://stackoverflow.com/questions/33280298
复制相似问题