Jupyter notebook widget problem

When I install jupyter notebooks, I do this:

sudo apt install jupyter

which works fine. But when I try this:

pip install --upgrade ipykernel

It says that this is externally managed, and that I need to do it this way:

sudo apt install python3-ipykernel

which does work.

But when I try this:

pip install webgui_jupyter_widgets

It says the same thing about externally managed and that I need to do it like this:

sudo apt install python3-webgui_jupyter_widgets

Unfortunately, this does not work.

What is the issue? I am using Ubuntu 24.04, which I thought was allowed for ngsolve, but maybe not.

this is a new linux thing to warn against installing pip packages:

in short add the --break-system-packages to the call or set it globally:

python3 -m pip config set global.break-system-packages true

Actually, I did that, but it still didn’t work. The jupyter notebook runs fine, but the draw commands are ignored.

I guess I should not have installed Ubuntu 24.04. I’ll go back to 22.04.