easygui icon indicating copy to clipboard operation
easygui copied to clipboard

ModuleNotFoundError: No module named 'global_state'

Open kemjim opened this issue 2 years ago • 4 comments

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?

kemjim avatar Dec 30 '22 19:12 kemjim

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

Can you provide the full stacktrace?

spyoungtech avatar Dec 30 '22 21:12 spyoungtech

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

kemjim avatar Dec 30 '22 23:12 kemjim

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.

zadacka avatar Jan 02 '23 20:01 zadacka

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?

baturax avatar Nov 17 '23 19:11 baturax