[Bug]: WebUI giving me the same error no matter what.
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Everytime I open WebUI, even if I try any suggested fixes = (Updated/Installing pip, installing Torch and Torchvision via Python, deleting the venv folder, etc.)
Error I am given:
Apparently, everytime I open webui-user.bat, no matter what I do, I get this error: Installing torch and torchvision Traceback (most recent call last): File "C:\StableDiffusion\stable-diffusion-webui\launch.py", line 306, in prepare_environment() File "C:\StableDiffusion\stable-diffusion-webui\launch.py", line 218, in prepare_environment run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch") File "C:\StableDiffusion\stable-diffusion-webui\launch.py", line 64, in run raise RuntimeError(message) RuntimeError: Couldn't install torch. Command: "C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113 Error code: 1 stdout: stderr: C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
Is webui-user.bat corrupted or somethin? I even added Python to PATH per Python 3.10.6 installation. What the frick do I do?
Steps to reproduce the problem
- Go to stable-diffusion-webui
- Press webui-user.bat
- Error occurs
What should have happened?
It should've successfully installed Stable DIffusion in about 5-20 mins (per fast installation)
Commit where the problem happens
Commit hash: 310b71f669e4f2cea11b023c47f7ffedd82ab464
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No response
Additional information, context and logs
In case of a situation like this I did this:
git pull @echo off
set PYTHON="C:\Users{USERNAME]\AppData\Local\Programs\Python\Python310\python.exe" set GIT= set VENV_DIR= set COMMANDLINE_ARGS=
call webui.bat
Got the same exact error. W H Y?
"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pip
Does this work in cmd? Should show you list of pip commands
"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pipDoes this work in cmd? Should show you list of pip commands
'-m' is not recognized as an internal or external command, operable program or batch file.
Nope. doesn't work :/
How about just python? "C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" Surely this should work and run interpreter in cmd.
Btw why did you set your python to be base version? Webui creates venv from that and then uses it automatically.

some people thought that helps :p btw it works and runs
Ye, sorry, this is exactly the argument to set base python, so you wouldnt have to add it to PATH variable
Wait, are you sure you executed whole line? "C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pip this error look like if you just wrote -m pip
If that was the case you should see No module named pip error, and then, execute following:
"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m ensurepip --upgrade
And then start webui. But if your python is missing -m flag, then sorry, i have no idea how that is possible.
Ye, sorry, this is exactly the argument to set base python, so you wouldnt have to add it to PATH variable
Wait, are you sure you executed whole line?
"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pipthis error look like if you just wrote-m pipIf that was the case you should see
No module named piperror, and then, execute following:"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m ensurepip --upgradeAnd then start webui. But if your python is missing -m flag, then sorry, i have no idea how that is possible.
Well I did that and...........................................
same error :') lemme show u what happened when I ran the command
Unable to create process using '"C:\Users[USER]\AppData\Local\Programs\Python\Python310\python.exe" -W ignore::DeprecationWarning -c "
import runpy
import sys
sys.path = ['C:\Users\[USER[\AppData\Local\Temp\tmp5pwwqdqb\setuptools-63.2.0-py3-none-any.whl', 'C:\Users\[USER[\AppData\Local\Temp\tmp5pwwqdqb\pip-22.2.1-py3-none-any.whl'] + sys.path
sys.argv[1:] = ['install', '--no-cache-dir', '--no-index', '--find-links', 'C:\Users\elija\AppData\Local\Temp\tmp5pwwqdqb', '--upgrade', 'setuptools', 'pip']
runpy.run_module("pip", run_name="main", alter_sys=True)
"'
Traceback (most recent call last):
File "C:\Users[USER[\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users[USER]\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users[USER]\AppData\Local\Programs\Python\Python310\lib\ensurepip_main.py", line 5, in
Then I ASSUMED it was supposed to do this and ran webui-user-bat yea... same issue
Ye, sorry, this is exactly the argument to set base python, so you wouldnt have to add it to PATH variable
Wait, are you sure you executed whole line?
"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pipthis error look like if you just wrote-m pipIf that was the case you should see
No module named piperror, and then, execute following:"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m ensurepip --upgradeAnd then start webui. But if your python is missing -m flag, then sorry, i have no idea how that is possible.
Thank God it worked the next 3 days :D