Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with a library
#1
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]
Reply
#2
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.
ebolisa, snippsat, nilamo like this post
Reply
#3
(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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pymssql library failing when upgrading to Python 3.7 - win32 issue stixmagiggins 5 7,414 Jun-24-2019, 06:46 AM
Last Post: snippsat
  libmagic library issue Sudhakar 0 5,160 Nov-13-2018, 09:06 PM
Last Post: Sudhakar
  Issue python3.6 while inheriting telnet library sourabhjaiswal92 4 4,084 May-09-2018, 05:20 AM
Last Post: sourabhjaiswal92
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,782 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020