Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kohya doesn't change version of Python #2443

Open
srinoom opened this issue May 5, 2024 · 4 comments
Open

Kohya doesn't change version of Python #2443

srinoom opened this issue May 5, 2024 · 4 comments

Comments

@srinoom
Copy link

srinoom commented May 5, 2024

at first, I had Python version 3.12 so when I installed kohya, it said this version it's Incompatible.
then I removed Python 3.12 with Windows uninstaller and deleted PATH, then I installed Python 3.10.11 which recommended version, and when I checked by using Python --version it is 3.10.11
but when I reinstalled kohya again it's said No Python at '"C:\Users<USERNAME>\AppData\Local\Programs\Python\Python312\python.exe"

@bmaltais
Copy link
Owner

bmaltais commented May 5, 2024

It is probably that the 1st version found in the path is still 10.12… because this is what the GUI scripts are seeing. I suspect you might need to fiddle with the path search order and make sure python 3.10.x comes 1st. This is really annoying and bugging me. I wish there was an easy way to specify the version but alas I have not found one that would work reliably.

@bmaltais
Copy link
Owner

bmaltais commented May 5, 2024

@srinoom OK... I might have a solution... not sure if it will work for everyone on windows...

Before running setup.bat make sure to delete the existing venv folder. Then try to run:

py -3.10 -m venv venv

Then run setup.bat... does it work?

@bmaltais
Copy link
Owner

bmaltais commented May 5, 2024

OK... I actually have implemented it in the dev branch... if you want to try it:

Delete the current venv folder then:

git fetch origin
git checkout dev
git pull
./setup-3.10.bat

@daniel-farina
Copy link

Using the python version manager works for me:

git clone https://github.com/pyenv-win/pyenv-win.git "$HOME/.pyenv"

Git bash, add the paths

nano ~/.bashrc
export PYENV="$HOME/.pyenv/pyenv-win"
export PATH="$PYENV/bin:$PYENV/shims:$PATH"
pyenv install 3.10.9
pyenv global 3.10.9
rm -rf venv
/.setup.bat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants