Python Forum

Full Version: Issue with a library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

For some reason, the IDE doesn't recognize a package. However, the same code runs fine using Visual Studio Code.
What should I look for?
TIA
[Image: cap1.png]
[Image: cap2.png]
Don't name your file that you're editing the same name as a module. It will break the import.

You want to import elements from PyQt5, but your local file is PyQt5.py. It's looking for the libraries inside that file.
(Feb-27-2021, 12:33 AM)bowlofred Wrote: [ -> ]Don't name your file that you're editing the same name as a module. It will break the import.

You want to import elements from PyQt5, but your local file is PyQt5.py. It's looking for the libraries inside that file.
You're absolutely right! I've broken a golden rule Wall
What threw me off is the fact the code worked in Visual Studio. Thank you!