DEV Community

Ahmad Khan
Ahmad Khan

Posted on

HELP!!!! Python Error

No module named 'PyQt5.QtWebEngineWidgets'

I tried reinstalling PyQt5 And PyQtWebEngine
but still its not working

This is my code

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()
Enter fullscreen mode Exit fullscreen mode

Image description

Top comments (1)

Collapse
 
taikedz profile image
TaiKedz

dev.to doesn't function well as a help forum - you would be better off asking at StackOverflow: stackoverflow.com/

Remember to describe

  • your environment (OS, version)
  • how you ran your install steps (pip, easy_install, etc - what command did you run, was there any error in the output).
  • whether you used a virtual environment previously, did you remember to laod it before installation/before execution

Photos of text are unhelpful - copy and paste the error text into the post so that it can be found by other people.

Don't answer those here - post at StackOverflow.