我是一个Windows,正在尝试启动PyGTK开发。我想从GTK+3开始,把这个文档写下来。
我的环境:
我的代码:
from gi.repository import Gtk
from gi.repository import GdkX11错误:
ERROR:root:Could not find any typelib for GdkX11
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 1534, in <module>
debugger.run(setup['file'], None, None)
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\pydevd.py", line 1145, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "C:\Program Files (x86)\JetBrains\PyCharm 3.1\helpers\pydev\_pydev_execfile.py", line 37, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc) #execute the script
File "Z:/git.repositories/gourmet-frontend/python/gourmet/main_gtk3.py", line 27, in <module>
from gi.repository import GdkX11
ImportError: cannot import name GdkX11当我安装rev18-setup.exe时,我选择所有选项并检查是否降级为GTK+ 3.8.9。
发布于 2014-04-16 05:55:55
GdkX11是一个依赖于平台的库,只能在X11平台上使用(顾名思义)。您将无法在Windows上找到它,您将不得不使用替换。
https://stackoverflow.com/questions/23088531
复制相似问题