Closed rafstahelin closed 8 months ago
A1111 requires python 3.10. We have no plan to change that.
Ok but auto1111, focus, comfyui, and kohya all work fine as it is with 3.12Can I downgrade to 3.10 and just rebuild all the venv’s?Best, Raf On 8 Feb 2024, at 16:13, Chenlei Hu @.***> wrote: A1111 requires python 3.10. We have no plan to change that.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
If you have an existing venv, you can reference it by setting it here: https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/291ec743b603fdcd9c58e60dc5ed3d866c53bc4c/webui-user.bat#L5
If you have an existing venv, you can reference it by setting it here:
Hello. will you kindly provide a step-by-step instruction on how to fix the problem for us? I know nothing about python and venv and really want to use forge. Thank you very much.
So I was able to get Forge to work on Python 3.11, in Ubuntu 24.04. Here are the steps I followed:
Add the PPA for extra Python libraries to the Ubuntu package manager. For more detailed instructions see here: The commands are basically this:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
Install a Stable Diffusion compatible python version AND the python venv module package.
sudo apt install python3.11 python3.11-venv
(For this next step, I recreated the whole 'venv' folder, just to be sure of avoiding conflicts. This may not be strictly necessary.)
In the folder where you installed / extracted / downloaded your Stable Diffusion Forge), rename any existing 'venv' folder to something else. I suggest 'venv.old'.
Create a new 'venv' folder with this command:
python3.11 -m venv "venv"
In the folder where you installed / extracted / downloaded your Stable Diffusion Forge), edit the file 'webui-user.sh'.
Change the section:
# python3 executable
#python_cmd="python3"
to be:
# python3 executable
python_cmd="python3.11"
That should fix your Stable Diffusion for Ubuntu 24.04!
Note: I was able to do this with Python 3.10 on Automatic1111 also. Same solution with adjusted version numbers for that.
There is another way I found, which helped me on Ubuntu 24.04, with pyenv:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Then you can test it with: python3 --version and it should show you 3.10.6, so inside of that directory it will use this version, while your global python 3.12.1 (or whatever version) which Ubuntu system uses will not change. just ./webui.sh
Checklist
What happened?
cannot install. What is the workaround?
Steps to reproduce the problem
Install with Python 3.12
What should have happened?
Installation
What browsers do you use to access the UI ?
No response
Sysinfo
Cannot install
Console logs
Additional information
No response