Cannot install stable-diffusion-webui

I tried to install stable-diffusion-webui, but it did not work. It's probably not correct Python version, but what can I do?

hgyamada@hgyamada-AR5:~/デスクトップ$ sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0
Identified face as hgyamada
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3 is already the newest version (3.8.2-0ubuntu2).
libgl1 is already the newest version (1.3.2-1~ubuntu0.20.04.2).
wget is already the newest version (1.20.3-1ubuntu2).
wget set to manually installed.
libglib2.0-0 is already the newest version (2.64.6-1~ubuntu20.04.6).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-venv : Depends: python3.8-venv (>= 3.8.2-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I suspect you may have to wait for Zorin 17 release.

1 Like

Have you ran sudo apt install --fix-broken? Then run sudo apt update && sudo apt upgrade, then try Py3 install again.

I tried that, but I get the same error.

The instructions list Python 3.10 as a dependency, but unfortunately Ubuntu 20.04 only goes as far as 3.8 so there's really not much you can do about it...

Given how this is really just a web interface (unless I'm misreading it) you could in theory just run through a Docker container which would allow you to run any Python version you want. The tricky part here is that you're supposed to provide access to the GPU and that's where I'm not sure if it'd work.
Another option would be using a virtual machine but same concern regarding the GPU.

I seem to remember that you can passthrough access to the GPU from within containers but I'll have to read more on that.

1 Like

That suggests otherwise; can be installed on 18.04 apparently :thinking:

That was from September 2023 btw..

Give that a shot with the deadsnakes ppa - looks promising. I'm not on Zorin right now to test it out, but I'm fairly confident that will work. I'm going to try this later on, I've got some family events to attend for turkey and stuffing.. my face :laughing:

Also may need to remove previous version of Python to get that broken packages message cleared up. Willing to bet that since the dependencies issue while trying to install, that broke so just needs to be removed. Happened to me a lot with the kernel utility - wouldn't install right and would break, then would have to remove and get it another way.


Yes, you can install 3.10 and 3.8 on Zorin OS. However, it can be tricky. Python is a critical dependency and this is one of those things that can really rear its head back and bite you.

Zorin OS depends on Python 3.8. For reasons unknown to me... software devs are in the habit of setting software depends based on the python version specifically instead of dynamically.
So replacing 3.8 with 3.10 will break Zorin OS since so many pieces of the system do this.

The method is to install both and leave 3.8 as default and then switch the individual application to reference 3.10 instead of default.
@337harvey may be a lot more help than I on this, since he has actively done this. It is Thanksgiving Holiday here, so may need to allow him some time off before responding.


Screenshot from 2023-11-23 20-25-22

Tis working for me - just added the ppa, updated, then apt install python3.10. Good to go! :sunglasses:

I didn't remove 3.8 for reference. But, 3.10.13 installed, no problems :grin:

Screenshot from 2023-11-23 20-29-18


I imagine the trick here is that you still have Python 3.8, so nothing is going to break because of that. Then, it's only a matter of ensuring that the stable-diffusion-webui is not invoking the generic "python" command, which normally is a symlink to the system's default Python binary, but the version at 3.10.

Maybe explicitly declaring python_cmd to point to Python3.10 before actually running anything. I would have to give it a try


Thanks for advice. I have used several deep learning-based image processing programmes, but I found that they are not casual about image generation. I would like to organise the information and consider it again.

I would caution against that.. That is definitely not solving any issues..

Deadsnakes provides Python 3.10 for Ubuntu, and its derivatives, from 18.04 - 22.04.. that's a lot of support. And ~20MB extra - and no trick.. They already have worked out dependencies.

Having different versions of Python installed is much like having multiple versions of Wine installed. I've now got both Python 3.8 and 3.10 installed, and working.. and if I want to use 3.8, I specify - like when using another version of Wine..

Would recommend checking out the ppa notes for deadsnakes..

For sure - system breaking is outlined in the ppa notes from deadsnakes. Pretty much the only reason I suggested using that ppa instead of trying to install the full version and really mucking things up.. That - would not be fun lol

I think we're saying the same thing.

As per the stable-diffusion-webui documentation, the Python executable used is determined by a variable named python_cmd. If not explicitly set by the user, it will default to be python3. In ZorinOS 16, python3 is a symbolic link to the Python3.8 executable. Since the minimum required version is Python 3.10, I'm suggesting to specify this variable explicitly to point to the correct binary (once you have it installed of course).

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.