Reputation: 33
I had a simple app up and running that used the PyGui package. After I decided I had everything working I refactored my code and basically broke it up over multiple files, but I am fairly sure I did not change the location of any files. Now when I try to run my app It gives me the following error:
Traceback (most recent call last):
File "blobedit.py", line 16, in <module>
from GUI import Application, ScrollableView, Document, Window, Cursor, rgb
File "/Users/<myusername>/Desktop/BlobEdit/GUI/__init__.py", line 54, in <module>
raise ImportError("Unable to find an implementation of PyGUI for this installation")
ImportError: Unable to find an implementation of PyGUI for this installation
I have tried moving files around for weeks and can't find the problem. Any help would be much appreciated!
Upvotes: 0
Views: 932
Reputation: 174614
You have a directory GUI
and inside it __init__.py
, this makes the directory an importable package.
Unfortunately, PyGUI also provides a GUI package. Due to the way Python searches for packages to import, your GUI
has come up first and this is what is causing problems.
The simple way to solve it is to rename your GUI directory /Users/Destkop/BlobEdit/GUI
to something else.
Upvotes: 0