AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.98k stars 26.67k forks source link

[Bug]: SD is not installed. An error occurred during installation. #15769

Open LibertyGM opened 5 months ago

LibertyGM commented 5 months ago

Checklist

What happened?

SD is not installed.

Steps to reproduce the problem

  1. git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
  2. run: webui.sh

What should have happened?

I want everything to install and work as before

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

SD is not installed

Console logs

Use --skip-python-version-check to suppress this warning.
=============================================================================================
Python 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]
Version: v1.9.3
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0, 2.2.0+cu121, 2.2.1, 2.2.1+cu121, 2.2.2, 2.2.2+cu121, 2.3.0, 2.3.0+cu121)
ERROR: No matching distribution found for torch==2.1.2
Traceback (most recent call last):
  File "/disks/F/stable-diffusion-webui/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/disks/F/stable-diffusion-webui/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/disks/F/stable-diffusion-webui/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 "/disks/F/stable-diffusion-webui/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/disks/F/stable-diffusion-webui/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

Operating System: Arch Linux KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 Kernel Version: 6.8.9-arch1-2 (64-bit) Graphics Platform: Wayland Processors: 32 × Intel® Core™ i9-14900KF Memory: 62.6 ГиБ of RAM Graphics Processor: NVIDIA GeForce RTX 4080/PCIe/SSE2 Manufacturer: ASUS

w-e-w commented 5 months ago

you are on Python 3.12.3 use 3.10

LibertyGM commented 5 months ago

you are on Python 3.12.3 use 3.10

I have additionally installed Python 3.10. Can you tell me what to do so that it is used in SD?

w-e-w commented 5 months ago
LibertyGM commented 5 months ago

Thank you. While I was waiting for an answer − I found this solution:

webui.sh

I replaced the version in the file and it turned out like this:

python3 executable

if [[ -z "${python_cmd}" ]] then python_cmd="python3.10" fi

gabriel-systems commented 4 months ago

same windows running windows 11

Delivator commented 4 months ago

I had the same issue, had the wrong python version fist, installed the correct one but it still failed. That because on the first run it sets the wrong python version for this venv.

So after installing the correct version you just need to remove the newly created "venv" folder and run the user-webui file again! It also says it in the script! WindowsTerminal_7eKGu5qjMQ

bhanuj10 commented 3 months ago

I had the same issue, had the wrong python version fist, installed the correct one but it still failed. That because on the first run it sets the wrong python version for this venv.

So after installing the correct version you just need to remove the newly created "venv" folder and run the user-webui file again! It also says it in the script! WindowsTerminal_7eKGu5qjMQ

Uninstall the python 3.12.4 and install the python 3.10.6 then i will work fine