PyQt4 ImportError for QtWebKit在 Mac OS Leopard 上
我被要求创建一个带有网络视图的应用程序。 我尝试导入 QtWebKit 模块,但出现此错误:
回溯(最近一次调用):文件“”,第 1 行,位于 导入错误: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtWebKit.so, 2):符号 未找到:_kCFWebServicesProviderDefaultDisplayNameKey 引用 来自:/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit
预计在: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
这是唯一一个返回此错误的模块。所有其他安装的模块都正常。文件 /Library/Python/2.6/site-packages/PyQt4/QtWebKit.so 存在。 问题可能是什么?
谢谢大家。
I've been requested to create an application with a webview in it.
I've tried to import QtWebKit module but I have this error:
Traceback (most recent call last): File "", line 1, in
ImportError:
dlopen(/Library/Python/2.6/site-packages/PyQt4/QtWebKit.so, 2): Symbol
not found: _kCFWebServicesProviderDefaultDisplayNameKey Referenced
from: /Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit
Expected in:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
It's the only one module that returns this error. All other installed modules are ok. The file /Library/Python/2.6/site-packages/PyQt4/QtWebKit.so exists.
What could the problem be?
Thank you all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过升级到 MacOSX Lion 来解决这个问题,但如果这不是一个选项,我只会确保 PyQt4 不使用 qt4.8,这就是引入此问题的地方。如果我没记错的话,qt4.7.4一切正常
I was able to fix the problem by upgrading to MacOSX Lion, but if that is not an option I would just ensure that PyQt4 is not using qt4.8, which is where this issue was introduced. If I remember correctly, everything works well with qt4.7.4