Can someone help me with my python venv #16353
Replies: 3 comments 6 replies
-
I guess you can create a python venv/conda env to make sure python version==3.10.6. recommand editing webui-user.sh, not webui.sh. |
Beta Was this translation helpful? Give feedback.
-
is it possible because the original venv was wrongly created with 3.12? my guess is that maybe you originally run it the first time and it created a 3.12 venv
I would try deleteing the current venv make sure stable-diffusion-webui/webui-user.sh Line 16 in 82a973c and relaunch
@viking1304 this seems related to your PR |
Beta Was this translation helpful? Give feedback.
-
thank you guys. I've done a bit of research into python venv environments so understand a bit more about them, and my problem was indeed caused by running a1111 before installing python3.10 so my venv was using python3.12. I'm pretty sure I didn't use the full path to python3.10 but either way all of the libraries and packages where under ~/.local/lib/python3.10 I took your advise and removed the venv and all the libraries under ~/.local Thanks for explaining what I did wrong |
Beta Was this translation helpful? Give feedback.
-
So im running linux mint 22 - based on ubuntu 24.04. It ships with python 3.12.3 which I dont think can be removed. So to get A1111 working I installed python 3.10 from the deadsnakes ppa. I then changed the webui.sh so that python_cmd would point to python3.10 and as of version 1.9.4 of a1111 it was all working.
However upgrading to 1.10.1 it seemed to revert back to trying to use python 3.12 even though the python_cmd was still set to python3.10.
Looking in webui.sh it seems to be the following lines that are causing my issue:
if [[ -f "${venv_dir}"/bin/activate ]]
then
source "${venv_dir}"/bin/activate
# ensure use of python from venv
python_cmd="${venv_dir}"/bin/python
else
removing python_cmd="${venv_dir}"/bin/python from that file and A1111 works fine and shows me the new version.
looking in my venv/bin directory in stable-diffusion shows me this:
So it appears that hte venv used by stable diffusion is pointing to python3 (python 3.12) BUT stablediffusion is working and showing that I am using python 3.10.
What is going on??
Beta Was this translation helpful? Give feedback.
All reactions