Qt 6.12 LTS is out! See what's new in the release
blog
ModuleNotFoundError: No module named 'PyQt6' using Thonny for Windows
-
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
-
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 ?