Went through the instructions of installing git, python of both Stable Diffusion 1.5 and 2.0(https://medium.com/geekculture/a-simple-way-to-run-stable-diffusion-2-0-locally-on-your-pc-no-code-guide-3beb911e444c guide for latest I used)and both don't work out on moment when I open webui-user.bat which is located in my
C:\SD2\stable-diffusion-webui-master
When launch webui-user.bat it says
Windows can't find "C:\SD2\stable-diffusion-webui-master\webui-user.bat" ```- the very file I just clickedWhen I launch cmd in that dir and try to use
PS C:\SD2\stable-diffusion-webui-master> python launch.py
that what it gives to me:
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]Commit hash: <none>Installing torch and torchvisionTraceback (most recent call last):File "C:\SD2\stable-diffusion-webui-master\launch.py", line 360, in <module>prepare_environment()File "C:\SD2\stable-diffusion-webui-master\launch.py", line 269, in prepare_environmentrun(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)File "C:\SD2\stable-diffusion-webui-master\launch.py", line 87, in runresult = subprocess.run(command, shell=True, env=os.environ if custom_env is None else custom_env)File "C:\Users\Sougo\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 501, in runwith Popen(*popenargs, **kwargs) as process:File "C:\Users\Sougo\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__self._execute_child(args, executable, preexec_fn, close_fds,File "C:\Users\Sougo\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_childhp, ht, pid, tid = _winapi.CreateProcess(executable, args,FileNotFoundError: [WinError 2] The system cannot find the file specifiedPS C:\SD2\stable-diffusion-webui-master>
How do I fix?
I tried installing/uninstalling different Pythons: Python 3.10.6 for SD 1.5 and 3.11 for the 2.0 both leave the same issue. I tried changing
shell=True
in that subprocess.py
file
but didn't change anything as well
It uploads git repo with no problem, but
FileNotFoundError: [WinError 2] The system cannot find the file specified
is hard to get fix. I saw another variant of virtual machines cmd - but didn't even get how to open that cmd, I doubt I have it causing issue
Best Answer
You must install an updated version of python, since you have an old installer for an old version. It is useless to re-install it, you must update the installer, going to download the latest version from the official page, which is currently python-3.10.10-amd64
When encountering the error message 'webui-user.bat couldn't launch python', there are several potential causes and solutions to consider.
Firstly, ensure that python is properly installed on your system and the 'python' command is accessible from the command line. If not, you may need to add the python executable to your system's PATH environment variable.
Additionally, check that the necessary dependencies for webui-user.bat are installed. This may include specific python packages or libraries that are required for its execution.
Another possible cause is conflicting versions of python or its dependencies. Make sure that the versions are compatible and there are no conflicts between different installations.
If all else fails, consider seeking support from the developer or community forums for the specific webui-user.bat tool you are using. They may have encountered similar issues and can provide further guidance.