stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: WebUI giving me the same error no matter what.

Open ChaosDraku opened this issue 3 years ago • 6 comments

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

  1. Go to stable-diffusion-webui
  2. Press webui-user.bat
  3. 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?

ChaosDraku avatar Jan 06 '23 14:01 ChaosDraku

"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pip Does this work in cmd? Should show you list of pip commands

mezotaken avatar Jan 06 '23 14:01 mezotaken

"C:\StableDiffusion\stable-diffusion-webui\venv\Scripts\python.exe" -m pip Does 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 :/

ChaosDraku avatar Jan 06 '23 14:01 ChaosDraku

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. image

mezotaken avatar Jan 06 '23 15:01 mezotaken

some people thought that helps :p btw it works and runs

ChaosDraku avatar Jan 06 '23 19:01 ChaosDraku

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.

mezotaken avatar Jan 06 '23 21:01 mezotaken

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.

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 sys.exit(ensurepip.main()) File "C:\Users[USER]\AppData\Local\Programs\Python\Python310\lib\ensurepip_init.py", line 287, in _main return bootstrap( File "C:\Users[USER]\AppData\Local\Programs\Python\Python310\lib\ensurepip_init.py", line 203, in _bootstrap return _run_pip([*args, *PACKAGE_NAMES], additional_paths) File "C:\Users[USER]\AppData\Local\Programs\Python\Python310\lib\ensurepip_init.py", line 104, in _run_pip return subprocess.run(cmd, check=True).returncode File "C:\Users[USER]\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['C:\Stable-Diffusion\stable-diffusion-webui\venv\Scripts\python.exe', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.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\nsys.argv[1:] = ['install', '--no-cache-dir', '--no-index', '--find-links', 'C:\\Users\\[USER]\\AppData\\Local\\Temp\\tmp5pwwqdqb', '--upgrade', 'setuptools', 'pip']\nrunpy.run_module("pip", run_name="main", alter_sys=True)\n']' returned non-zero exit status 101.

Then I ASSUMED it was supposed to do this and ran webui-user-bat yea... same issue

ChaosDraku avatar Jan 07 '23 03:01 ChaosDraku

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.

Thank God it worked the next 3 days :D

ChaosDraku avatar Jan 08 '23 20:01 ChaosDraku