[Bug]: Can't install pythorc=2.1.2 missing
Checklist
- [ ] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
What happened?
ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1) ERROR: No matching distribution found for torch==2.1.2
Steps to reproduce the problem
run ./webui.sh
What should have happened?
install packages
What browsers do you use to access the UI ?
No response
Sysinfo
can't run
Console logs
Traceback (most recent call last):
File "/home/michele/IdeaProjects/stable-diffusion-webui/launch.py", line 48, in <module>
main()
File "/home/michele/IdeaProjects/stable-diffusion-webui/launch.py", line 39, in main
prepare_environment()
File "/home/michele/IdeaProjects/stable-diffusion-webui/modules/launch_utils.py", line 380, in prepare_environment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
File "/home/michele/IdeaProjects/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/michele/IdeaProjects/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1
Additional information
No response
Installing python 3.10.6 and setting as global version:
michele@fedora:~/IdeaProjects/stable-diffusion-webui$ ./webui.sh
################################################################ Install script for stable-diffusion + Web UI Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer. ################################################################
################################################################ Running on michele user ################################################################
################################################################ Repo already cloned, using it as install directory ################################################################
################################################################ ERROR: python3-venv is not installed, aborting... ################################################################
Did you try a command like this ? pip install --no-cache-dir torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121 That worked for me after activating the venv and using the no-cache-dir arg Another way would be manually downloading the tarball file from the torch homepage and placing it inside of folder to install it manually.
I installed python 3.10.6 but it still continue to have errors.
michele@fedora:~/IdeaProjects/stable-diffusion-webui$ python --version
Python 3.10.6
michele@fedora:~/IdeaProjects/stable-diffusion-webui$ ./webui.sh
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################
################################################################
Running on michele user
################################################################
################################################################
Repo already cloned, using it as install directory
################################################################
################################################################
Create and activate python venv
################################################################
################################################################
Launching launch.py...
################################################################
glibc version is 2.39
Check TCMalloc: libtcmalloc_minimal.so.4
libtcmalloc_minimal.so.4 is linked with libc.so,execute LD_PRELOAD=/lib64/libtcmalloc_minimal.so.4
Python 3.10.6 (main, Jun 13 2024, 19:09:30) [GCC 14.1.1 20240607 (Red Hat 14.1.1-5)]
Version: v1.9.4
Commit hash: feee37d75f1b168768014e4634dcb156ee649c05
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
Collecting torch==2.1.2
Using cached https://download.pytorch.org/whl/cu121/torch-2.1.2%2Bcu121-cp310-cp310-linux_x86_64.whl (2200.7 MB)
Collecting torchvision==0.16.2
Using cached https://download.pytorch.org/whl/cu121/torchvision-0.16.2%2Bcu121-cp310-cp310-linux_x86_64.whl (6.8 MB)
Collecting filelock
Using cached filelock-3.15.1-py3-none-any.whl (15 kB)
Collecting networkx
Using cached networkx-3.3-py3-none-any.whl (1.7 MB)
Collecting sympy
Using cached sympy-1.12.1-py3-none-any.whl (5.7 MB)
Collecting fsspec
Using cached fsspec-2024.6.0-py3-none-any.whl (176 kB)
Collecting triton==2.1.0
Using cached https://download.pytorch.org/whl/triton-2.1.0-0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (89.2 MB)
Collecting jinja2
Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)
Collecting typing-extensions
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Collecting numpy
Using cached numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pillow!=8.3.*,>=5.3.0
Using cached pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (4.5 MB)
Collecting requests
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting MarkupSafe>=2.0
Using cached https://download.pytorch.org/whl/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting idna<4,>=2.5
Using cached idna-3.7-py3-none-any.whl (66 kB)
Collecting urllib3<3,>=1.21.1
Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2024.6.2-py3-none-any.whl (164 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting mpmath<1.4.0,>=1.1.0
Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, fsspec, filelock, charset-normalizer, certifi, triton, requests, jinja2, torch, torchvision
Successfully installed MarkupSafe-2.1.5 certifi-2024.6.2 charset-normalizer-3.3.2 filelock-3.15.1 fsspec-2024.6.0 idna-3.7 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 numpy-1.26.4 pillow-10.3.0 requests-2.32.3 sympy-1.12.1 torch-2.1.2+cu121 torchvision-0.16.2+cu121 triton-2.1.0 typing-extensions-4.12.2 urllib3-2.2.1
WARNING: There was an error checking the latest version of pip.
Traceback (most recent call last):
File "/home/michele/IdeaProjects/stable-diffusion-webui/launch.py", line 48, in <module>
main()
File "/home/michele/IdeaProjects/stable-diffusion-webui/launch.py", line 39, in main
prepare_environment()
File "/home/michele/IdeaProjects/stable-diffusion-webui/modules/launch_utils.py", line 386, in prepare_environment
raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
michele@fedora:~/IdeaProjects/stable-diffusion-webui$
I have an Nvidia supported gpu:
michele@fedora:~$ inxi -G
Graphics:
Device-1: NVIDIA AD103 [GeForce RTX 4080 SUPER] driver: nvidia v: 550.78
Device-2: AMD Raphael driver: amdgpu v: kernel
Display: wayland server: X.Org v: 24.1 with: Xwayland v: 24.1.0
compositor: gnome-shell v: 46.2 driver: X: loaded: nouveau
gpu: nvidia,nvidia-nvswitch resolution: 2560x1440~165Hz
API: OpenGL v: 4.6.0 vendor: nvidia v: 550.78 renderer: NVIDIA GeForce
RTX 4080 SUPER/PCIe/SSE2
API: EGL Message: EGL data requires eglinfo. Check --recommends.
Running with --skip-torch-cuda-test
michele@fedora:~/IdeaProjects/stable-diffusion-webui$ ./webui.sh --skip-torch-cuda-test
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################
################################################################
Running on michele user
################################################################
################################################################
Repo already cloned, using it as install directory
################################################################
################################################################
Create and activate python venv
################################################################
################################################################
Launching launch.py...
################################################################
glibc version is 2.39
Check TCMalloc: libtcmalloc_minimal.so.4
libtcmalloc_minimal.so.4 is linked with libc.so,execute LD_PRELOAD=/lib64/libtcmalloc_minimal.so.4
Python 3.10.6 (main, Jun 13 2024, 19:09:30) [GCC 14.1.1 20240607 (Red Hat 14.1.1-5)]
Version: v1.9.4
Commit hash: feee37d75f1b168768014e4634dcb156ee649c05
Installing clip
Installing open_clip
Installing requirements
Launching Web UI with arguments: --skip-torch-cuda-test
Traceback (most recent call last):
File "/home/michele/IdeaProjects/stable-diffusion-webui/launch.py", line 48, in <module>
main()
File "/home/michele/IdeaProjects/stable-diffusion-webui/launch.py", line 44, in main
start()
File "/home/michele/IdeaProjects/stable-diffusion-webui/modules/launch_utils.py", line 465, in start
import webui
File "/home/michele/IdeaProjects/stable-diffusion-webui/webui.py", line 13, in <module>
initialize.imports()
File "/home/michele/IdeaProjects/stable-diffusion-webui/modules/initialize.py", line 15, in imports
import torch # noqa: F401
File "/home/michele/IdeaProjects/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/__init__.py", line 17, in <module>
import ctypes
File "/home/michele/.pyenv/versions/3.10.6/lib/python3.10/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
michele@fedora:~/IdeaProjects/stable-diffusion-webui$
Check the requirements again. I think you're missing a library or something.
Check the requirements again. I think you're missing a library or something.
if I miss a library is missing in requirements.txt so is a repo issue.
Not necessarily, before installing automatic1111 repo your system has to be prepared. Maybe you should try stability matrix, its an auto installer for many different Repos. For Example A1111, SD.Next, ComfyUI, Dreambooth, Kohya SS, and so on. Otherwise you need to check if you need Visual Studio, .Net, Cuda Toolkit, Cuddn and so on.