1

I am using pycharm and python 3.7 and I have installed PyQt5 When using this snippet

import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl
from PyQt5.QtWebEngineWidgets import QWebPage

I got an error: from PyQt5.QtWebEngineWidgets import QWebPage ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

Any ideas how to fix that error..?

I have downloaded PyQt5_gpl-5.10 and this is snapshot of the downloaded files enter image description here

How can I install those files in pycharm? from local path?

I am newbie to python so please give me detailed steps if possible Regards

YasserKhalil
  • 9,138
  • 7
  • 36
  • 95
  • 32 bits or 64 bits? – eyllanesc Nov 04 '18 at 05:13
  • read https://stackoverflow.com/questions/51154871/python-3-7-0-no-module-named-pyqt5-qtwebenginewidgets – eyllanesc Nov 04 '18 at 05:14
  • @ eyllanesc : Windows 7 32 Bit – YasserKhalil Nov 04 '18 at 16:38
  • 1
    Read https://www.riverbankcomputing.com/software/pyqt/download5 : *Note that for v5.11 and later the 32-bit Windows wheels do not contain the WebEngine modules.* – eyllanesc Nov 04 '18 at 16:44
  • so use an old version of PyQt5, or use a 64bit PC or compile QtWebEngine manualement for 32 bits (the latter is a heavy and tedious task if you are a beginner) – eyllanesc Nov 04 '18 at 16:46
  • Thanks a lot for great help. Can you give me a link to older version that would work for me .. as I have searched and lost in fact – YasserKhalil Nov 04 '18 at 22:15
  • as indicated by the docs with PyQt 5.9 or PyQt 5.10 should work – eyllanesc Nov 04 '18 at 22:16
  • So what ..? Can you provide me with a link to this working version? – YasserKhalil Nov 05 '18 at 04:56
  • use pip: `pip install pyqt5==5.10` – eyllanesc Nov 05 '18 at 04:57
  • Thanks a lot. That's greta. How about pycharm..? How can I use pip install in pycharm .. Sorry for my trivial questions(that's because I am so beginner) – YasserKhalil Nov 05 '18 at 04:59
  • Using pycharm as shown in the following tutorial you can choose the version of the library you want. https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html – eyllanesc Nov 05 '18 at 05:03
  • Thanks a lot. I can't get a clue>> I have installed pyqt5 in pycharm (not 5.10) as it doesn't exist when searching inside pycharm. Will I uninstall the version I installed? How can I install the file I downloaded in main post of this thread (There's snapshot) – YasserKhalil Nov 05 '18 at 06:16

1 Answers1

1

You should install older version not the latest one

pip install PyQt5==5.7.1

wilk85
  • 67
  • 10