Jupyter crashes when using PyPlot and Julia 1.12

Hi,
I don’t know why, but since I upgraded to julia 1.12 from 1.11 i most often get jupyter to simply crash when starting to load packages. Sometimes even the very first cell with simply

using PyPlot
already crashes
[36275] signal 11 (1): Segmentation fault
in expression starting at none:1
and I’ve tried everything to no avail. But by restarting the kernel two or more times, even turning everything off and on again, I may get it to work. Needless to say, in the REPL the same thing always works. I’ve completely removed julia and erased .julia to start from scratch, and that keeps happening. I’m working in ubuntu.ate 25.10, btw.
I wonder if anybody else has such experience, and if there’s a way to correct that. Right now is pretty irritating…
Thanks for your help.

What is the output of:

versioninfo()

I encountered crashes with PyPlot, mainly when the wrong C++ library was loaded. This often occurs when the LD_LIBRARY_PATH variable is not empty.

In addition, rebuilding PyCall might help:

ENV["PYTHON"]=""
Pkg.build("PyCall")

Finally, Julia 1.12 uses more than one thread by default, which is not compatible with PyPlot. So launching Julia with:

julia -t 1

might also help.

PythonPlot might be compatible with multi-threading.