robertlugg / easygui

easygui for Python
http://easygui.readthedocs.org/en/master/
BSD 3-Clause "New" or "Revised" License
457 stars 116 forks source link

ModuleNotFoundError: No module named 'global_state' #213

Open kemjim opened 1 year ago

kemjim commented 1 year ago

I am using Python 3.9.12 and I installed easygui. When I import it, it says "ModuleNotFoundError: No module named 'global_state'" Did anyone have a similar issue? If so, how did you resolve it?

spyoungtech commented 1 year ago

@kemjim did you by chance name any of your Python files or project directories as easygui or boxes?

Can you provide the full stacktrace?

kemjim commented 1 year ago

Hello @spyoungtech, I didn't name any files as easygui or boxes. My directory name is photo_project. I have a virtual environment in that directory where I installed rembg and easygui. My file's name is project.py

zadacka commented 1 year ago

Hi @kemjim - likely you need to install the tkinter library.

Can you try installing the dependent library. Assuming 'nix, something like: sudo apt-get install python3-tk

And let us know how you get on, please?

This might be useful too: https://stackoverflow.com/questions/68673016/modulenotfounderror-no-module-named-global-state

Side note: it isn't a very helpful error message that you see - we should maybe have easygui do a check at import time so that we could prefix the ModuleNotFound error with some helpful text.

baturax commented 1 year ago

Hi @kemjim - likely you need to install the tkinter library.

Can you try installing the dependent library. Assuming 'nix, something like: sudo apt-get install python3-tk

And let us know how you get on, please?

This might be useful too: https://stackoverflow.com/questions/68673016/modulenotfounderror-no-module-named-global-state

Side note: it isn't a very helpful error message that you see - we should maybe have easygui do a check at import time so that we could prefix the ModuleNotFound error with some helpful text.

i wonder can't we use easygui with tk by installing from pip?