Python Forum
Issue with a library - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Issue with a library (/thread-32699.html)



Issue with a library - ebolisa - Feb-27-2021

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]


RE: Issue with a library - bowlofred - Feb-27-2021

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.


RE: Issue with a library - ebolisa - Feb-27-2021

(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!