Python Forum
[PyQt] ModuleNotFoundError: No module named 'PyQt5'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] ModuleNotFoundError: No module named 'PyQt5'
#1
I have installed PyQt5 and PyQt5-tools using command prompt and pip install PyQt5 then pip install PyQt5-tools everything installed fine
I then put in the following code

from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow
import sys

def window():
    app = QApplication(sys.argv)
    win = QMainWindow()
    win.setGeometry(200, 200, 300, 300)
    win.setWindowTtitle("Darts Scoreboard")

    win.show()
    sys.exit(app.exec_())

Window()
but get the following traceback
Error:
C:\Users\44787\PycharmProjects\untitled\venv\Scripts\python.exe C:/Users/44787/PycharmProjects/untitled/Scoreboard.py Traceback (most recent call last): File "C:/Users/44787/PycharmProjects/untitled/Scoreboard.py", line 1, in <module> from PyQt5 import QtWidgets ModuleNotFoundError: No module named 'PyQt5'
I have checked alsort of youtube help advice and instructions and nothing seems to work can someone please please help

Thanks
Reply


Messages In This Thread
ModuleNotFoundError: No module named 'PyQt5' - by matklt - Jun-01-2020, 10:14 PM
RE: Help Needed loosing my mind - by menator01 - Jun-01-2020, 10:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [FIXED] User-defined module: ModuleNotFoundError error in VSCode but not in PyCharm epoxy 5 12,066 Jun-01-2021, 02:16 AM
Last Post: deanhystad
  [WxPython] Linux: No module named 'wx' PeterLinux 23 15,746 Apr-02-2020, 12:50 PM
Last Post: PeterLinux
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,822 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [Kivy] ModuleNotFoundError: No module named 'kivy' Exsul 7 30,265 Mar-30-2019, 12:58 AM
Last Post: Exsul
  "ModuleNotFoundError: No module named '_tkinter' in Python 3.8 Alfa 0 programmerc 1 6,350 Oct-21-2018, 06:32 PM
Last Post: Larz60+
  PyGtk3, No Module Named gi, on python3.5 on Windows harun2525 8 34,454 May-19-2017, 01:30 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020