stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: RuntimeError: Couldn't install torch. | stderr: ERROR: Exception:
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Every time i am trying to install webui i got error. I updated gpu drivers, re-installed python and its still not working and i got same error and i don't know what to do anymore.
Steps to reproduce the problem
Creating venv in directory venv using python "C:\Users\HP\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
venv "G:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
Commit hash: b08698a09a257365238e43cc9023ce7cf9af73c4
Installing torch and torchvision
Traceback (most recent call last):
File "G:\stable-diffusion-webui\launch.py", line 251, in
stderr: ERROR: Exception: Traceback (most recent call last): File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\cli\base_command.py", line 167, in exc_logging_wrapper status = run_func(*args) File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\cli\req_command.py", line 247, in wrapper return func(self, options, args) File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\commands\install.py", line 461, in run installed = install_given_reqs( File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\req_init_.py", line 73, in install_given_reqs requirement.install( File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\req\req_install.py", line 790, in install install_wheel( File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\operations\install\wheel.py", line 727, in install_wheel _install_wheel( File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\operations\install\wheel.py", line 587, in _install_wheel file.save() File "G:\stable-diffusion-webui\venv\lib\site-packages\pip_internal\operations\install\wheel.py", line 388, in save shutil.copyfileobj(f, dest) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 195, in copyfileobj buf = fsrc_read(length) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\zipfile.py", line 925, in read data = self._read1(n) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\zipfile.py", line 1015, in _read1 self._update_crc(data) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\zipfile.py", line 943, in _update_crc raise BadZipFile("Bad CRC-32 for file %r" % self.name) zipfile.BadZipFile: Bad CRC-32 for file 'torch/lib/cusolverMg64_11.dll'
[notice] A new release of pip available: 22.2.2 -> 22.3.1 [notice] To update, run: G:\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Press any key to continue . . .
What should have happened?
install it obviously.
Commit where the problem happens
when installing
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
No response
Command Line Arguments
No response
Additional information, context and logs
No response
Try this command
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Same error as before
I have this same issue, it appears to be something caused by one of the most recent updates. I had no problem with installation prior to 4 days ago.
@FijiZay Did you ever figure out a solution?
I have this same issue, it appears to be something caused by one of the most recent updates. I had no problem with installation prior to 4 days ago.
@FijiZay Did you ever figure out a solution?
Sadly no and i don't know what's causing it.
Same here
so I hope this will help and it fixed it for me, I had to go back to python 3.10.7 for torch to install. A search on stack overflow regarding torch mentioned it was behind the latest releases of python
nothing works
3.10.7 same results as 3.10.6 i really wanted to do something but this trash cant even work and there is noone who can help me
@AUTOMATIC1111 i tried everything and i am loosing it
guys try using Docker ported version https://github.com/AbdBarho/stable-diffusion-webui-docker
Solution is to use Python 3.10.6 64-bit install as listed in dependencies.
Other versions will not work.
had the same issue i managed to fix it by uninstalling every pyhton installation and manually deleting it's directories,restarting the computer and installing python through the .exe specified in here ,also choose custom installation and check add to path option ,that seemed to have solved it
Closing as stale.