Repository: stable-diffusion-webui
Issue: [Bug]: Networkx version error on Ubuntu 20.04
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [X] 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?

On executing a freshly downloaded copy of webui.sh, it tries to grab networkx-3.2.1 which is not compatible with Python 3.8.



### Steps to reproduce the problem

1. `sudo apt install wget git python3 python3-venv`
2. `wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh > sd-webui.sh`
3. `bash sd-webui.sh`

### What should have happened?

WebUI should have been installed.

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

Mozilla Firefox

### Sysinfo

That didn't work either:

```
$ bash sd-webui.sh --dump-sysinfo

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on ken user
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.31
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Traceback (most recent call last):
  File "launch.py", line 48, in <module>
    main()
  File "launch.py", line 29, in main
    filename = launch_utils.dump_sysinfo()
  File "/userfiles/ken/ai/stable-diffusion-webui/modules/launch_utils.py", line 473, in dump_sysinfo
    from modules import sysinfo
  File "/userfiles/ken/ai/stable-diffusion-webui/modules/sysinfo.py", line 8, in <module>
    import psutil
ModuleNotFoundError: No module named 'psutil'
```

### Console logs

```Shell
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on ken user
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.31
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Python 3.8.10 (default, Mar 25 2024, 10:42:49) 
[GCC 9.4.0]
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-cp38-cp38-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-cp38-cp38-linux_x86_64.whl (6.9 MB)
Collecting networkx
  Using cached https://download.pytorch.org/whl/networkx-3.2.1-py3-none-any.whl (1.6 MB)
ERROR: Package 'networkx' requires a different Python: 3.8.10 not in '>=3.9'
Traceback (most recent call last):
  File "launch.py", line 48, in <module>
    main()
  File "launch.py", line 39, in main
    prepare_environment()
  File "/userfiles/ken/ai/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 "/userfiles/ken/ai/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/userfiles/ken/ai/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

See also https://github.com/mlcommons/inference/issues/1697 which seems to reference the same bug.

I was able to install `pip3 install torch torchvision torchaudio` but I can't see how to translate that to your config files for python3-venv.