Python Forum
"ModuleNotFoundError: No module named 'PyQt5.QtWidgets'; 'PyQt5' is not a package"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"ModuleNotFoundError: No module named 'PyQt5.QtWidgets'; 'PyQt5' is not a package"
#1
Hi, I've been trying to solve this problem with VScode for 2 days:
"ModuleNotFoundError: No module named 'PyQt5.QtWidgets'; 'PyQt5' is not a package".
Of course PyQt5 5.15.6 and Python 3.9.5 pip 21.3.1 are installed.
I've tried everything, searched the internet but nothing to do.
What's strange is that from the Python 3.9.5 shell
I enter 'import PyQt5' and it imports it without problems, but in VScode it gives me the message above.
I think the problem is VScode. Any ideas?
Thanks a lot!


ps
Same example. In the Python shell it works in VScode it doesn't.

Attached Files

Thumbnail(s)
       
Reply


Messages In This Thread
"ModuleNotFoundError: No module named 'PyQt5.QtWidgets'; 'PyQt5' is not a package" - by chipx - Dec-08-2021, 11:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Stuck on installing PyQt5-tools safety789 1 260 Apr-11-2024, 03:40 PM
Last Post: snippsat
  no module named 'docx' when importing docx MaartenRo 1 894 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Database connection problems [login, PyQt5, PySql] gradlon93 5 726 Dec-15-2023, 05:08 PM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 23,812 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 2,601 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 1,462 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,523 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 1,347 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 1,046 Jul-09-2023, 11:24 AM
Last Post: yaoyao22
  Help with pyinstaller "No module named" korenron 9 9,139 Jun-15-2023, 12:20 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