Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. ModuleNotFoundError: No module named 'PyQt6' using Thonny for Windows
Qt 6.12 LTS is out! See what's new in the release blog

ModuleNotFoundError: No module named 'PyQt6' using Thonny for Windows

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 228 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    teejayuu
    wrote last edited by
    #1

    Hello,

    I am following the PyQt6 tutorial using the Thonny IDE in Windows 11,and when I run the script I get the following error:

    Traceback (most recent call last):
      File "C:\Users\tonyj\Scripts\Python\app.py", line 1, in <module>
        from PyQt6.QtWidgets import QApplication, QWidget
    ModuleNotFoundError: No module named 'PyQt6'
    

    If I call the script from Python it works perfectly. I've also tried it in PvCharm and VSCode: both display the same error. All systems (Windows, Python, Pip etc) are all at the latest version.

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi and welcome to devnet,

      I didn't know it's existence so there are a couple of things. You seem to have an existing Python setup on your system, correct ?
      Thonny comes with its own Python environment if installed through its package.
      So:

      • How did you install Thonny ?
      • If through its official package, did you install PyQt6 from within the IDE ?
      • If wanting to use your existing Python environment, did you follow the separate install wiki page ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved