Open PochiiBoy opened 11 months ago
It seems not to be a bug but I ran into the same issue. Torch is not compatible with newer Python versions. Even though I set the path in the webui to 10.06 with "set PYTHON=" the version in the venv directory was the latest version I had installed there by i was unable to install torch
Fix: 1) Uninstall all Python versions except version 10.06 2) delete the venv directory 3) run webui-script
It seems not to be a bug but I ran into the same issue. Torch is not compatible with newer Python versions. Even though I set the path in the webui to 10.06 with "set PYTHON=" the version in the venv directory was the latest version I had installed there by i was unable to install torch
Fix:
- Uninstall all Python versions except version 10.06
- delete the venv directory
- run webui-script
Sweet! Thank you. I'll try this out real soon but I bet this will fix it.
I decided to uninstall everything and install Python 3.10.6 and then install everything else again. I have python 3.10.6 and no other version and its installed to my PATH but I get the same error about torch :c
Does the pyvenv file in the venv directory contain the correct python version?
I decided to uninstall everything and install Python 3.10.6 and then install everything else again. I have python 3.10.6 and no other version and its installed to my PATH but I get the same error about torch :c
Can you post your error message again? The old message stated Python 3.12.1 in the top left.
Yes, in the pyvenv file it shows 3.10.6.
ImportError: cannot import name 'urllib3' from 'pip._vendor' (C:\ai\stable-diffusion-webui\venv\lib\site-packages\pip\_vendor\__init__.py) Traceback (most recent call last): File "C:\ai\stable-diffusion-webui\launch.py", line 48, in <module> main() File "C:\ai\stable-diffusion-webui\launch.py", line 39, in main prepare_environment() File "C:\ai\stable-diffusion-webui\modules\launch_utils.py", line 378, in prepare_environment run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True) File "C:\ai\stable-diffusion-webui\modules\launch_utils.py", line 116, in run raise RuntimeError("\n".join(error_bits)) RuntimeError: Couldn't install torch. Command: "C:\ai\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118 Error code: 1 Press any key to continue . . .
This looks like an other error did you pull the latest version from the git? Maybe you can take a look at this: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5928
When I git clone it am I getting the latest version? Cause that is what I always do.
When I git clone it am I getting the latest version? Cause that is what I always do.
clone is usually a one time process. I´m not sure what appens if you git clone multiple times. Maybe it updates maybe it skips. Try going to your stable diffusion directory where you can see the .git folder (if you have enabled display hidden elements) and run the command git pull
this will update to the latest version. Then delete the venv folder and execute the webui-user file.
It was all up to date but deleting the venv folder worked ^^ I just had to add the --no-half and --skip-torch-cuda-test commandline args :)))
It seems not to be a bug but I ran into the same issue. Torch is not compatible with newer Python versions. Even though I set the path in the webui to 10.06 with "set PYTHON=" the version in the venv directory was the latest version I had installed there by i was unable to install torch
Fix:
- Uninstall all Python versions except version 10.06
- delete the venv directory
- run webui-script
so you basically did this and it worked (including step 2)
Yee, for some reason the first time i deleted it with the new python version it didnt work
Based on my installation experience, I would like to give two suggestions:
Thanks @loo-kevin , I had the same issue on Arch Linux and pip
was missing.
So I solved after a simple $ yay -S python-pip
Checklist
What happened?
When I run webui-user.bat on Windows 10 it will start to install torch and torchvision but is unable to find the version 2.0.1 of torch. Other issues related to this from what I have seen were on another OS and was a memory issue but my allocated Vmemory (12800mb) is much above my recommended (3958mb).
Steps to reproduce the problem
What should have happened?
Torch should have been installed and the rest of the install should have continued.
What browsers do you use to access the UI ?
Other
Sysinfo
(im so sorry, was having trouble figuring out how to run sysinfo command) Windows 10 Home Version 22H2 GPU: AMD Radeon RX 6600 XT Processor: AMD Ryzen 5 3600 6-Core Processor 3.60 GHz RAM: 24.0 GB
Console logs
Additional information
No response