我目前正在尝试使用GTK3和Python3进行GUI开发。Windows3上的Python3和GTK3
一切正常,而这样做我的Ubuntu设备上,但我希望能有后来的Windows可执行文件,我需要设置这些工具了在Windows 7
我的Python 3.4.4 (64位)安装在我的系统上,并试图从Stackoverflow上的其他帖子的解决方案,以便能够使用GTK,但我无法让它工作。
当试图对Python的外壳导入基于GTK(import gi
和from gi.repository import Gtk
),出现以下错误:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python34\lib\site-packages\gi\importer.py", line 100, in find_module
'introspection typelib not found' % namespace)
ImportError: cannot import name Gtk, introspection typelib not found
我在此刻安装什么:
- PyGi 3.18.2 AIO for Python 3.4 64-bit
- GTK3-Runtime Win64 (安装过程中创建的
bin
目录包含在PATH中)
哪种方法可以在Windows上获得Python3和GTK3的工作集? (据我所见,使用Ubuntu创建Windows可执行文件是不可能的。)
请发布此代码并带来此错误以进行调试简化 –
@ArduinoSentinel该代码已包含在我的文章中(请参阅错误消息上方的段落)。 – epR8GaYuh
@oldtechaa GNOME PyGObject页面上的链接引导我进入我在文章中已经提到的Sourceforge项目页面,但似乎不起作用。 – epR8GaYuh