Reputation: 11
I already install all of the things but can't seem to get it to work. here is the thing that shows up
> F:\stable\stable-diffusion-webui>git pull Already up to date. venv
> "F:\stable\stable-diffusion-webui\venv\Scripts\Python.exe" Python
> 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Commit hash: 64da5c46ef0d68b9048747c2e0d46ce3495f9f29
> Installing torch and torchvision
> F:\stable\stable-diffusion-webui\venv\Scripts\python.exe: No module
> named pip Traceback (most recent call last): File
> "F:\stable\stable-diffusion-webui\launch.py", line 351, in <module>
> prepare_environment() File "F:\stable\stable-diffusion-webui\launch.py", line 253, in
> prepare_environment
> run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True) File
> "F:\stable\stable-diffusion-webui\launch.py", line 81, in run
> raise RuntimeError(f"""{errdesc or 'Error running command'}. RuntimeError: Couldn't install torch. Command:
> "F:\stable\stable-diffusion-webui\venv\Scripts\python.exe" -m pip
> install torch==1.13.1+cu117 torchvision==0.14.1+cu117
> --extra-index-url https://download.pytorch.org/whl/cu117 Error code: 1
I've already delete the venv folder many time and install many differect version of Python. The pip files is install from ealsewhere. I check the box that istall pip but python refused to have any files in script.(I don't know why, it happen eveytime) so I have to install it from else where but still works.(Computer reconize pip as a command)
If I delete the venv file this will show up
F:\stable\stable-diffusion-webui>git pull
Already up to date.
Creating venv in directory F:\stable\stable-diffusion-webui\venv using python "F:\Newfolder\python310\python.exe"
Unable to create venv in directory "F:\stable\stable-diffusion-webui\venv"
exit code: 1
stderr:
Error: Command '['F:\\stable\\stable-diffusion-webui\\venv\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Lastly, I also try changing the path with the Edit environment variable but nothing works. any help would be appreciated
First I install git hup
run the install stable diffusion on my F drives
Install python 3.11.2.
run the diffusion
The diffusion tell me the python is it too new so I deleted it and dowload 10.10. it didn't come with Pip files so I install the pip files form internet. Run pip in cmd and it seem to work.
run diffusion again. Get the above result try reinstalling it. Still the same. Lastly, I tried downgrading it to 3.10.6. because some people say it works for them. But it's still the same for me. try deleting the venv files. still the same result.
Upvotes: 1
Views: 14957
Reputation: 1
Doing changes with already present SD installation often break things. I've had plenty of issues with my setup but it all boiled down to:
I used Automatic1111 to run on AMD GPU and without python 3.10.6, which was pointed multiple times in guide, SD didn't even try to create venv, which is once again heavy emphasis on 3) in what I've wrote.
Upvotes: 0
Reputation: 274
If you are trying to install the Automatic1111 UI then within your "webui-user.bat" file add/update following lines of code before "Call webui.bat" and use Python version 3.10. I am using python version 3.10.11 and its working fine i.e.
...
SET PATH=C:\Program Files\Git;C:\Program Files\Git\bin;C:\Program Files\Python310;C:\Program Files\Python310\Scripts;C:\Program Files\Python310\Lib;C:\Program Files\Python310\include
SET PYTHON=
SET GIT=
SET VENV_DIR=F:\stable\stable-diffusion-webui\venv
...
call webui.bat
Upvotes: 0
Reputation: 21
You might have downgraded or upgraded the python version after running the webui-user.bat file or the webui-user.sh file. Running this command creates the dir venv in the folder stable-diffusion-webui now this folder consists of the python different python version so that is the reason its giving an error.
Solution to the problem: delete the directory venv which is located inside the folder stable-diffusion-webui and run the webui-user. Thi may solve the issue.
Upvotes: 2