【发布时间】:2018-09-22 00:07:09
【问题描述】:
在过去的几天里,我一直在尝试准备一个可以在 python 中使用 GTK 和 WebKit 的开发。我已经放弃了ubuntu,现在我只想先专注于mac。我已经安装了 pygobject3 并且可以加载 GTK 3.0。但我无法让 WebKit 工作。错误信息是这样的,
>>> import gi
>>> from gi.repository import WebKit
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 888, 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 "/usr/local/lib/python3.6/site-packages/gi/importer.py", line 127, in find_module
'introspection typelib not found' % namespace)
ImportError: cannot import name WebKit, introspection typelib not found
我尝试过使用“WebKit2”、“WebKit3”等...
我还从webkit.org 下载并构建了 WebKit,但它什么也没做。
我很想获得一些指导以正确安装它,我可以上传您希望我运行的任何测试并在此处及时更新它。
非常感谢!
【问题讨论】:
标签: python python-3.x macos webkit pygobject