简体   繁体   English

ModuleNotFoundError:没有名为“ PyQt5.QtWebKit”的模块

[英]ModuleNotFoundError: No module named 'PyQt5.QtWebKit'

I'm new to python and have been playing around with it and have ran into a problem using PyQt5. 我是python的新手,并且一直在使用它,并且在使用PyQt5时遇到了问题。 Could someone please explain to me what this means: 有人可以向我解释这是什么意思:

ModuleNotFoundError: No module named 'PyQt5.QtWebKit'. ModuleNotFoundError:没有名为“ PyQt5.QtWebKit”的模块。

Actually, I think I understand WHAT it means, but how do i fix it? 实际上,我认为我理解这意味着什么,但是我该如何解决? I found a solution in another forum but all it said was QtWebKit needed to be compiled in PyQt5. 我在另一个论坛上找到了一个解决方案,但它所说的只是QtWebKit需要在PyQt5中进行编译。 I don't understand what that means or how to do it. 我不明白这是什么意思或怎么做。

I should clarify by saying I have installed PyQt5 and I have ran some example scripts with just simple windows with a few widgets. 我应该通过说说我已经安装了PyQt5来进行澄清,并且我已经运行了一些示例脚本,这些示例脚本仅带有一些小部件的简单窗口。 I started getting this error trying to use code from a tutorial on creating a web browser with PyQt5. 我开始在尝试使用PyQt5创建Web浏览器的教程中的代码时收到此错误。

I really like the python language and I am wanting to convert a project from Access to python. 我真的很喜欢python语言,并且想将项目从Access转换为python。 In the Access project, I have a few WebBrowser controls and I was looking for a GUI toolkit that would allow me to do the same thing using python. 在Access项目中,我有一些WebBrowser控件,我正在寻找一个GUI工具包,该工具包允许我使用python做同样的事情。 I thought PyQt5 would work, but I keep getting the ModuleNotFoundError. 我以为PyQt5可以工作,但我一直收到ModuleNotFoundError。

I am using Windows 8.1 if that makes a difference. 我正在使用Windows 8.1,如果有所作为。

Try this link http://pyqt.sourceforge.net/Docs/PyQt4/qtwebkit.html 试试此链接http://pyqt.sourceforge.net/Docs/PyQt4/qtwebkit.html

The error message is typical if the module has not been imported in the script, or if an error in finding the module has occurred. 如果未在脚本中导入模块,或者在查找模块时发生错误,则通常会显示错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM