bmaltais / kohya_ss

Apache License 2.0
9.43k stars 1.22k forks source link

Errors while trying to run setup.bat #2421

Open lideborg opened 5 months ago

lideborg commented 5 months ago

Getting this error while trying to install. Same error when execturing the file as well as from terminal. Any idea on how to fix?

PS C:\Users\hampu> git clone --recursive https://github.com/bmaltais/kohya_ss.git fatal: destination path 'kohya_ss' already exists and is not an empty directory. PS C:\Users\hampu> cd kohya_ss PS C:\Users\hampu\kohya_ss> .\setup.bat C:\Users\hampu\kohya_ss\setup\setup_windows.py:251: SyntaxWarning: invalid escape sequence '\g' "start cmd /k .\gui.bat --inbrowser", shell=True Traceback (most recent call last): File "C:\Users\hampu\kohya_ss\setup\setup_windows.py", line 7, in import setup_common File "C:\Users\hampu\kohya_ss\setup\setup_common.py", line 8, in import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' PS C:\Users\hampu\kohya_ss>

Screenshot_4

bmaltais commented 5 months ago

Make sure you delete the original kohya_ss folder. It was not able to clone the latest code because it complained that there was already a folder called kohya_ss.

Disty0 commented 5 months ago

Are you using Python 3.12? Wipe the venv folder and use 3.10 or 3.11.

DukeSniper commented 5 months ago

Both the SyntaxWarning and the ModuleNotFoundError indicate a Python version that's too new. There are fixes in dev that will prevent both of these issues and allow for a better Error Messages clearly stating that the Python version is wrong. As @Disty0 already stated: downgrade Python to a supported version. I had to learn that the hard way myself :)

@bmaltais: Duplicate of #2404

lideborg commented 5 months ago

Thanks guys, downgrading to an earlier version of Pyhton (3.10) worked!