'No module named 'PyQt5.QtWebEngineWidgets'

I'm using windows

pip install PyQt5

pip install PyQtWebEngine

I've installed the web engine still it's showing the error

import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *

class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        self.browser = QWebEngineView()
        self.browser.setUrl(QUrl('http://google.com'))
        self.setCentralWidget(self.browser)
        self.showMaximized()


app = QApplication(sys.argv)
QApplication.setApplicationName('Pheonix Browser')
window = MainWindow()
app.exec()

Error Screen SS



Solution 1:[1]

Use,

import PyQtWebEngine

Instead of using,

from PyQt5.QtWebEngineWidgets import *

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1