stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Problem running / installing on WSL

Open lh-bx4 opened this issue 3 years ago • 3 comments

Hello, I'm trying to install on Debian, using the suggested commands in the README. Though, when trying to run (bash webui.sh) I get an error when "Installing the requirement for WebUI".

Here is the log : `Launching launch.py... ################################################################ Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] Commit hash: 45c46f4cb3d6924882bd944712be168c7c2f605d Installing requirements for Web UI Traceback (most recent call last): File "/home/hoareal/stable-diffusion-webui/launch.py", line 127, in run_pip(f"install -r {requirements_file}", "requirements for Web UI") File "/home/hoareal/stable-diffusion-webui/launch.py", line 64, in run_pip return run(f'"{python}" -m pip {args} --prefer-binary', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}") File "/home/hoareal/stable-diffusion-webui/launch.py", line 54, in run raise RuntimeError(message) RuntimeError: Couldn't install requirements for Web UI. Command: "/home/hoareal/stable-diffusion-webui/venv/bin/python3" -m pip install -r requirements_versions.txt --prefer-binary Error code: 1 stdout: Collecting transformers==4.19.2 Using cached transformers-4.19.2-py3-none-any.whl (4.2 MB) Collecting diffusers==0.2.4 Using cached diffusers-0.2.4-py3-none-any.whl (112 kB) Collecting basicsr==1.3.5 Using cached basicsr-1.3.5.tar.gz (161 kB) Requirement already satisfied: gfpgan in ./venv/lib/python3.9/site-packages (from -r requirements_versions.txt (line 4)) (1.3.5) Collecting gradio==3.3.1 Using cached gradio-3.3.1-py3-none-any.whl (5.3 MB) Requirement already satisfied: numpy==1.23.3 in ./venv/lib/python3.9/site-packages (from -r requirements_versions.txt (line 6)) (1.23.3) Requirement already satisfied: Pillow==9.2.0 in ./venv/lib/python3.9/site-packages (from -r requirements_versions.txt (line 7)) (9.2.0) Collecting realesrgan==0.2.5.0 Using cached realesrgan-0.2.5.0-py3-none-any.whl (25 kB) Requirement already satisfied: torch in ./venv/lib/python3.9/site-packages (from -r requirements_versions.txt (line 9)) (1.12.1+cu113) Collecting omegaconf==2.1.1 Using cached omegaconf-2.1.1-py3-none-any.whl (74 kB) Collecting pytorch_lightning==1.7.2 Using cached pytorch_lightning-1.7.2-py3-none-any.whl (705 kB) Collecting scikit-image==0.19.2 Using cached scikit_image-0.19.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB) Collecting fonts Using cached fonts-0.0.3-py3-none-any.whl (4.2 kB) Collecting font-roboto Using cached font-roboto-0.0.1.tar.gz (2.4 MB) Collecting timm==0.4.12 Using cached timm-0.4.12-py3-none-any.whl (376 kB) Collecting fairscale==0.4.4 Using cached fairscale-0.4.4.tar.gz (235 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Installing backend dependencies: started Installing backend dependencies: finished with status 'done' Preparing wheel metadata: started Preparing wheel metadata: finished with status 'done' Collecting piexif==1.1.3 Using cached piexif-1.1.3-py2.py3-none-any.whl (20 kB) Requirement already satisfied: addict in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (2.4.0) Requirement already satisfied: future in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (0.18.2) Requirement already satisfied: lmdb in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (1.3.0) Requirement already satisfied: opencv-python in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (4.6.0.66) Requirement already satisfied: pyyaml in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (6.0) Requirement already satisfied: requests in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (2.25.1) Requirement already satisfied: scipy in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (1.9.1) Requirement already satisfied: tb-nightly in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (2.11.0a20220919) Requirement already satisfied: torchvision in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (0.13.1) Requirement already satisfied: tqdm in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (4.64.1) Requirement already satisfied: yapf in ./venv/lib/python3.9/site-packages (from basicsr==1.3.5->-r requirements_versions.txt (line 3)) (0.32.0) Requirement already satisfied: filelock in ./venv/lib/python3.9/site-packages (from diffusers==0.2.4->-r requirements_versions.txt (line 2)) (3.8.0) Requirement already satisfied: regex!=2019.12.17 in ./venv/lib/python3.9/site-packages (from diffusers==0.2.4->-r requirements_versions.txt (line 2)) (2022.9.13) Requirement already satisfied: importlib-metadata in ./venv/lib/python3.9/site-packages (from diffusers==0.2.4->-r requirements_versions.txt (line 2)) (4.12.0) Collecting huggingface-hub<1.0,>=0.8.1 Using cached huggingface_hub-0.9.1-py3-none-any.whl (120 kB) Collecting python-multipart Using cached python_multipart-0.0.4-py3-none-any.whl (31 kB) Collecting pydub Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB) Collecting ffmpy Using cached ffmpy-0.3.0.tar.gz (4.8 kB) Collecting h11<0.13,>=0.11 Using cached h11-0.12.0-py3-none-any.whl (54 kB) Collecting uvicorn Using cached uvicorn-0.18.3-py3-none-any.whl (57 kB) Collecting markdown-it-py[linkify,plugins] Using cached markdown_it_py-2.1.0-py3-none-any.whl (84 kB) Collecting httpx Using cached httpx-0.23.0-py3-none-any.whl (84 kB) Collecting orjson Using cached orjson-3.8.0-cp39-cp39-manylinux_2_28_x86_64.whl (146 kB) Collecting websockets Using cached websockets-10.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (111 kB) Collecting pandas Using cached pandas-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB) Requirement already satisfied: matplotlib in ./venv/lib/python3.9/site-packages (from gradio==3.3.1->-r requirements_versions.txt (line 5)) (3.6.0) Collecting fastapi Using cached fastapi-0.85.0-py3-none-any.whl (55 kB) Collecting fsspec Using cached fsspec-2022.8.2-py3-none-any.whl (140 kB) Collecting aiohttp Using cached aiohttp-3.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB) Collecting analytics-python Using cached analytics_python-1.4.0-py2.py3-none-any.whl (15 kB) Collecting jinja2 Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Collecting paramiko Using cached paramiko-2.11.0-py2.py3-none-any.whl (212 kB) Collecting pycryptodome Using cached pycryptodome-3.15.0-cp35-abi3-manylinux2010_x86_64.whl (2.3 MB) Collecting pydantic Using cached pydantic-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.2 MB) Collecting antlr4-python3-runtime==4.8 Using cached antlr4-python3-runtime-4.8.tar.gz (112 kB) Requirement already satisfied: typing-extensions>=4.0.0 in ./venv/lib/python3.9/site-packages (from pytorch_lightning==1.7.2->-r requirements_versions.txt (line 12)) (4.3.0) Requirement already satisfied: packaging>=17.0 in ./venv/lib/python3.9/site-packages (from pytorch_lightning==1.7.2->-r requirements_versions.txt (line 12)) (21.3) Collecting pyDeprecate>=0.3.1 Using cached pyDeprecate-0.3.2-py3-none-any.whl (10 kB) Collecting tensorboard>=2.9.1 Using cached tensorboard-2.10.0-py3-none-any.whl (5.9 MB) Collecting torchmetrics>=0.7.0 Using cached torchmetrics-0.9.3-py3-none-any.whl (419 kB) Requirement already satisfied: facexlib>=0.2.0.3 in ./venv/lib/python3.9/site-packages (from realesrgan==0.2.5.0->-r requirements_versions.txt (line 8)) (0.2.5) Requirement already satisfied: networkx>=2.2 in ./venv/lib/python3.9/site-packages (from scikit-image==0.19.2->-r requirements_versions.txt (line 13)) (2.8.6) Requirement already satisfied: imageio>=2.4.1 in ./venv/lib/python3.9/site-packages (from scikit-image==0.19.2->-r requirements_versions.txt (line 13)) (2.22.0) Requirement already satisfied: PyWavelets>=1.1.1 in ./venv/lib/python3.9/site-packages (from scikit-image==0.19.2->-r requirements_versions.txt (line 13)) (1.4.1) Requirement already satisfied: tifffile>=2019.7.26 in ./venv/lib/python3.9/site-packages (from scikit-image==0.19.2->-r requirements_versions.txt (line 13)) (2022.8.12) Collecting tokenizers!=0.11.3,<0.13,>=0.11.1 Using cached tokenizers-0.12.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.6 MB) Collecting gfpgan Using cached gfpgan-1.3.8-py3-none-any.whl (52 kB) Using cached gfpgan-1.3.7-py3-none-any.whl (58 kB) Using cached gfpgan-1.3.6-py3-none-any.whl (62 kB) Using cached gfpgan-1.3.5-py3-none-any.whl (47 kB) Using cached gfpgan-1.3.4-py3-none-any.whl (47 kB) Using cached gfpgan-1.3.2-py3-none-any.whl (47 kB) Using cached gfpgan-1.3.1-py3-none-any.whl (47 kB) Using cached gfpgan-1.3.0-py3-none-any.whl (42 kB) Using cached gfpgan-0.2.4-py3-none-any.whl (38 kB) Using cached gfpgan-0.2.3-py3-none-any.whl (36 kB) Using cached gfpgan-0.2.1.tar.gz (35 kB) INFO: pip is looking at multiple versions of antlr4-python3-runtime to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of transformers to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of timm to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of scikit-image to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of realesrgan to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of pytorch-lightning to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of pillow to determine which version is compatible with other requirements. This could take a while. Collecting Pillow==9.2.0 Using cached Pillow-9.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.2 MB) INFO: pip is looking at multiple versions of piexif to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of omegaconf to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while. Collecting numpy==1.23.3 Using cached numpy-1.23.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB) INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of fairscale to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of diffusers to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of basicsr to determine which version is compatible with other requirements. This could take a while.

The conflict is caused by: The user requested basicsr==1.3.5 realesrgan 0.2.5.0 depends on basicsr>=1.3.3.11 gfpgan 1.3.5 depends on basicsr>=1.4.2 The user requested basicsr==1.3.5 realesrgan 0.2.5.0 depends on basicsr>=1.3.3.11 gfpgan 1.3.8 depends on basicsr>=1.4.2 The user requested basicsr==1.3.5 realesrgan 0.2.5.0 depends on basicsr>=1.3.3.11 gfpgan 1.3.7 depends on basicsr>=1.4.2 The user requested basicsr==1.3.5 realesrgan 0.2.5.0 depends on basicsr>=1.3.3.11 gfpgan 1.3.6 depends on basicsr>=1.4.2 The user requested numpy==1.23.3 basicsr 1.3.5 depends on numpy diffusers 0.2.4 depends on numpy gradio 3.3.1 depends on numpy pytorch-lightning 1.7.2 depends on numpy>=1.17.2 realesrgan 0.2.5.0 depends on numpy scikit-image 0.19.2 depends on numpy>=1.17.0 transformers 4.19.2 depends on numpy>=1.17 gfpgan 1.3.4 depends on numpy<1.21 The user requested numpy==1.23.3 basicsr 1.3.5 depends on numpy diffusers 0.2.4 depends on numpy gradio 3.3.1 depends on numpy pytorch-lightning 1.7.2 depends on numpy>=1.17.2 realesrgan 0.2.5.0 depends on numpy scikit-image 0.19.2 depends on numpy>=1.17.0 transformers 4.19.2 depends on numpy>=1.17 gfpgan 1.3.2 depends on numpy<1.21 The user requested numpy==1.23.3 basicsr 1.3.5 depends on numpy diffusers 0.2.4 depends on numpy gradio 3.3.1 depends on numpy pytorch-lightning 1.7.2 depends on numpy>=1.17.2 realesrgan 0.2.5.0 depends on numpy scikit-image 0.19.2 depends on numpy>=1.17.0 transformers 4.19.2 depends on numpy>=1.17 gfpgan 1.3.1 depends on numpy<1.21 The user requested numpy==1.23.3 basicsr 1.3.5 depends on numpy diffusers 0.2.4 depends on numpy gradio 3.3.1 depends on numpy pytorch-lightning 1.7.2 depends on numpy>=1.17.2 realesrgan 0.2.5.0 depends on numpy scikit-image 0.19.2 depends on numpy>=1.17.0 transformers 4.19.2 depends on numpy>=1.17 gfpgan 1.3.0 depends on numpy<1.21 The user requested numpy==1.23.3 basicsr 1.3.5 depends on numpy diffusers 0.2.4 depends on numpy gradio 3.3.1 depends on numpy pytorch-lightning 1.7.2 depends on numpy>=1.17.2 realesrgan 0.2.5.0 depends on numpy scikit-image 0.19.2 depends on numpy>=1.17.0 transformers 4.19.2 depends on numpy>=1.17 gfpgan 0.2.4 depends on numpy<1.21 The user requested numpy==1.23.3 basicsr 1.3.5 depends on numpy diffusers 0.2.4 depends on numpy gradio 3.3.1 depends on numpy pytorch-lightning 1.7.2 depends on numpy>=1.17.2 realesrgan 0.2.5.0 depends on numpy scikit-image 0.19.2 depends on numpy>=1.17.0 transformers 4.19.2 depends on numpy>=1.17 gfpgan 0.2.3 depends on numpy<1.21

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

stderr: ERROR: Command errored out with exit status 1: command: /home/hoareal/stable-diffusion-webui/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/setup.py'"'"'; file='"'"'/tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ecqe_j9v cwd: /tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/ Complete output (30 lines): Traceback (most recent call last): File "/tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/setup.py", line 48, in get_hash from facexlib.version import version File "/home/hoareal/stable-diffusion-webui/venv/lib/python3.9/site-packages/facexlib/init.py", line 2, in from .alignment import * File "/home/hoareal/stable-diffusion-webui/venv/lib/python3.9/site-packages/facexlib/alignment/init.py", line 3, in from facexlib.utils import load_file_from_url File "/home/hoareal/stable-diffusion-webui/venv/lib/python3.9/site-packages/facexlib/utils/init.py", line 1, in from .face_utils import align_crop_face_landmarks, compute_increased_bbox, get_valid_bboxes, paste_face_back File "/home/hoareal/stable-diffusion-webui/venv/lib/python3.9/site-packages/facexlib/utils/face_utils.py", line 1, in import cv2 File "/home/hoareal/stable-diffusion-webui/venv/lib/python3.9/site-packages/cv2/init.py", line 181, in bootstrap() File "/home/hoareal/stable-diffusion-webui/venv/lib/python3.9/site-packages/cv2/init.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libGL.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/setup.py", line 89, in <module>
    write_version_py()
  File "/tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/setup.py", line 65, in write_version_py
    sha = get_hash()
  File "/tmp/pip-install-d_ugmxjp/gfpgan_f75e7a06602b4da398460b285224657e/setup.py", line 51, in get_hash
    raise ImportError('Unable to get git version')
ImportError: Unable to get git version
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/66/5f/2460cd8e5c9943e02897ab5747235d8bfe21ffa3c96be701092566168fca/gfpgan-0.2.1.tar.gz#sha256=58c007adf0c25cb90f4be34a4b02dc1dd8639b0f3adfbfa13a5ad9307c23ae7b (from https://pypi.org/simple/gfpgan/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Cannot install -r requirements_versions.txt (line 1), -r requirements_versions.txt (line 12), -r requirements_versions.txt (line 13), -r requirements_versions.txt (line 2), -r requirements_versions.txt (line 3), -r requirements_versions.txt (line 4), -r requirements_versions.txt (line 5), -r requirements_versions.txt (line 8), basicsr==1.3.5, gfpgan==1.3.5 and numpy==1.23.3 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies`

I'm not sure to understand the error as I'm not trully experienced in Linux and python.

Note that I tried to update sudo apt-get update sudo apt-get upgrade sudo apt install python3-pip

Also, git is known in my WSL Debian environnment.

Thanks in advance

lh-bx4 avatar Sep 21 '22 10:09 lh-bx4

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

You need to install the dependencies for ligGL.so.1

Try this: sudo apt-get update && sudo apt-get install libgl1

andrewginns avatar Sep 25 '22 13:09 andrewginns

Great, it worked. Just in case anyone has the problem also, I havn't lightread installed on my wsl debian. I found those commands : sudo apt update sudo apt-get install -y libglib2.0-0 libsm6 libxrender1 libxext6

Source : https://stackoverflow.com/questions/62786028/importerror-libgthread-2-0-so-0-cannot-open-shared-object-file-no-such-file-o

lh-bx4 avatar Oct 05 '22 06:10 lh-bx4

This should be included as a dependency, it's tough to have to try this down each time I install on WSL.

JamesIV4 avatar Nov 09 '22 20:11 JamesIV4

I found on most Systems libgthread-2_0-0 (this is the rpm version) and Mesa (preinstalled on many physical systems but not WSL/Docker) are enough.

Momi-V avatar Dec 22 '22 13:12 Momi-V

I also had to install libglib2.0-0 on nvidia/cuda docker, e.g.

apt-get install -y libgl1 libglib2.0-0

jchook avatar Jan 04 '23 03:01 jchook

this is an old issue which is fixed and no longer seems relevant, if this issue is related to future issues, please refer to this previous one.

ClashSAN avatar May 01 '23 20:05 ClashSAN