Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: webui.sh no longer properly installs on ubuntu server 20.04.5 #13383

Open
1 task done
klutchdev opened this issue Sep 25, 2023 · 14 comments
Open
1 task done

[Bug]: webui.sh no longer properly installs on ubuntu server 20.04.5 #13383

klutchdev opened this issue Sep 25, 2023 · 14 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@klutchdev
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

The host machine keeps attempting to use python 3.8.10, resulting in a failure to install.

Stack trace:

Cloning BLIP into /home/ubuntu/stable-diffusion-webui/repositories/BLIP...
Cloning into '/home/ubuntu/stable-diffusion-webui/repositories/BLIP'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112
Receiving objects: 100% (277/277), 7.03 MiB | 27.28 MiB/s, done.
Resolving deltas: 100% (153/153), done.
Installing requirements for CodeFormer
Installing requirements
^[[34~Launching Web UI with arguments:
^[[34~Traceback (most recent call last):
  File "launch.py", line 48, in <module>
    main()
  File "launch.py", line 44, in main
    start()
  File "/home/ubuntu/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
    import webui
  File "/home/ubuntu/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  File "/home/ubuntu/stable-diffusion-webui/modules/initialize.py", line 21, in imports
    import gradio  # noqa: F401
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/components/__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/components/annotated_image.py", line 12, in <module>
    from gradio import utils
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/utils.py", line 353, in <module>
    class AsyncRequest:
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/utils.py", line 372, in AsyncRequest
    client = httpx.AsyncClient()
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_client.py", line 1397, in __init__
    self._transport = self._init_transport(
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_client.py", line 1445, in _init_transport
    return AsyncHTTPTransport(
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_transports/default.py", line 275, in __init__
    self._pool = httpcore.AsyncConnectionPool(
TypeError: __init__() got an unexpected keyword argument 'socket_options'
ubuntu@146-235-208-81:~$

Pytorch fails to install

This results in having to build the correct python version from source which is not reliable.

Steps to reproduce the problem

Just follow the install instructions from github docs

chmod  +x webui.sh;
./webui.sh ```



### What should have happened?

It should have installed!

### Sysinfo

WebUI not able to run because of install failure

### What browsers do you use to access the UI ?

Google Chrome

### Console logs

```Shell
Stack trace:

Cloning BLIP into /home/ubuntu/stable-diffusion-webui/repositories/BLIP...
Cloning into '/home/ubuntu/stable-diffusion-webui/repositories/BLIP'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112
Receiving objects: 100% (277/277), 7.03 MiB | 27.28 MiB/s, done.
Resolving deltas: 100% (153/153), done.
Installing requirements for CodeFormer
Installing requirements
^[[34~Launching Web UI with arguments:
^[[34~Traceback (most recent call last):
  File "launch.py", line 48, in <module>
    main()
  File "launch.py", line 44, in main
    start()
  File "/home/ubuntu/stable-diffusion-webui/modules/launch_utils.py", line 432, in start
    import webui
  File "/home/ubuntu/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  File "/home/ubuntu/stable-diffusion-webui/modules/initialize.py", line 21, in imports
    import gradio  # noqa: F401
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/components/__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/components/annotated_image.py", line 12, in <module>
    from gradio import utils
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/utils.py", line 353, in <module>
    class AsyncRequest:
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/gradio/utils.py", line 372, in AsyncRequest
    client = httpx.AsyncClient()
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_client.py", line 1397, in __init__
    self._transport = self._init_transport(
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_client.py", line 1445, in _init_transport
    return AsyncHTTPTransport(
  File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/httpx/_transports/default.py", line 275, in __init__
    self._pool = httpcore.AsyncConnectionPool(
TypeError: __init__() got an unexpected keyword argument 'socket_options'
ubuntu@146-235-208-81:~$


### Additional information

_No response_
@klutchdev klutchdev added the bug-report Report of a bug, yet to be confirmed label Sep 25, 2023
@Fab1anDev
Copy link

Try this: bash webui.sh --skip-torch-cuda-test . It works for me

@eliocamp
Copy link

eliocamp commented Sep 25, 2023

Can confirm this issue; --skip-torch-cuda-test didn't solve it.

@jhalek90
Copy link

can also confirm this issue, --skip-torch-cuda-test did not solve the issue for me either.

@eliocamp
Copy link

From #13236, this seems to be an issue with python < 3.10. A1111 now requires Python 3.10, which is not available for ubuntu 20.04.

@jhalek90
Copy link

even if you install 3.10.6, from source, the webui.sh still attempts to use 3.8.10.
a quick fix for this is to setup python alternatives, and change

python_cmd="python3"
to
python_cmd="python"

on line 47 of webui.sh

@Fab1anDev
Copy link

Can confirm this issue; --skip-torch-cuda-test didn't solve it.

Hmm very wierd because i install SD on my Ubuntu Server and it was fixed with this command

@eliocamp
Copy link

Frustratingly, I get this error even if I checkout version 1.5.0, even if I delete the venv folder 😖

@MislavJuric
Copy link

I am also having issues with this. I was able to get past this error, but I got another error. I documented my process here.

@DEQDON
Copy link

DEQDON commented Oct 2, 2023

According to #13236 (comment),
These two commands fixed the issue for me on ubuntu20.04:

pip install -U pip
pip install -U httpcore

@eliocamp
Copy link

eliocamp commented Oct 2, 2023

According to #13236 (comment), These two commands fixed the issue for me on ubuntu20.04:

pip install -U pip
pip install -U httpcore

This didn't fix the issue for me (it didn't install anything because it said that "Requirement already satisfied").

@YusukeSuzuki
Copy link

The problem is caused by the venv provided by the script. First, there is a discrepancy between the package version assumed by the Python code in the WebUI and the package version introduced by vennv: the Python code requires httpcore 0.18.0 (as a dependency package required by anyio), but vennv introduces 0.15.0. 0.15.0 is introduced in venv. The Python code itself is written for Python 3.9 or later language features.

Disable the settings in webui.sh to use vennv. You can also use the latest version of python3 in pyenv virtualenv to start python3. Don't forget to keep the various packages up-to-date.

@MarcoFreitas95
Copy link

try this:
edit this file "requirements_versions.txt" in root, and add this "httpx==0.24.1" above this "httpcore==0.15"
should be like this:
httpx==0.24.1
httpcore==0.15
and try again, it worked for me

@pereriksson
Copy link

pereriksson commented Nov 5, 2023

try this: edit this file "requirements_versions.txt" in root, and add this "httpx==0.24.1" above this "httpcore==0.15" should be like this: httpx==0.24.1 httpcore==0.15 and try again, it worked for me

Adding httpx==0.24.1 to requirements_versions.txt fixed this issue for me also on my Paperspace instance.

@eliocamp
Copy link

eliocamp commented Nov 8, 2023

This fixed the issue for me using version 1.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

9 participants