bmaltais / kohya_ss

Apache License 2.0
8.79k stars 1.14k forks source link

[error] - module not found - tk and global_state #2567

Closed Sparkenstein closed 1 month ago

Sparkenstein commented 1 month ago

I ran setup.py successfully, but after clicking on gui.bat I got following error:

19:37:32-132621 INFO     Verifying modules installation status from requirements_pytorch_windows.txt...
19:37:32-134621 INFO     Verifying modules installation status from requirements_windows.txt...
19:37:32-135621 INFO     Verifying modules installation status from requirements.txt...
Traceback (most recent call last):
  File "D:\kohya_ss\venv\lib\site-packages\easygui\boxes\utils.py", line 29, in <module>
    import tkinter as tk  # python3
ModuleNotFoundError: No module named 'tkinter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\kohya_ss\venv\lib\site-packages\easygui\boxes\utils.py", line 36, in <module>
    import Tkinter as tk  # python2
ModuleNotFoundError: No module named 'Tkinter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\kohya_ss\venv\lib\site-packages\easygui\boxes\button_box.py", line 15, in <module>
    from . import utils as ut
  File "D:\kohya_ss\venv\lib\site-packages\easygui\boxes\utils.py", line 43, in <module>
    raise ImportError("Unable to find tkinter package.")
ImportError: Unable to find tkinter package.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\kohya_ss\kohya_gui.py", line 4, in <module>
    from kohya_gui.class_gui_config import KohyaSSGUIConfig
  File "D:\kohya_ss\kohya_gui\class_gui_config.py", line 2, in <module>
    from .common_gui import scriptdir
  File "D:\kohya_ss\kohya_gui\common_gui.py", line 5, in <module>
    from easygui import msgbox, ynbox
  File "D:\kohya_ss\venv\lib\site-packages\easygui\__init__.py", line 34, in <module>
    from .boxes.button_box import buttonbox
  File "D:\kohya_ss\venv\lib\site-packages\easygui\boxes\button_box.py", line 18, in <module>
    import global_state
ModuleNotFoundError: No module named 'global_state'
Sparkenstein commented 1 month ago

This was python distribution issue, I had chocolaty python installed. after installing setup from python official website it worked.

I think this should be mentioned in the readme.