# Jupyter crashes when using PyPlot and Julia 1.12

**URL:** https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684
**Category:** General Usage
**Created:** [December 22, 2025, 9:55am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684 "2025-12-22T09:55:11Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Ferran\_Mazzanti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ferran_mazzanti/32/7458_2.png) [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)
#### Post date: [December 22, 2025, 9:55am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/1 "2025-12-22T09:55:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 22, 2025, 8:44pm UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/2 "2025-12-22T20:44:02Z")

</div>

What is the output of:

```julia-auto
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:

```julia-auto
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-auto
julia -t 1

```

might also help.

PythonPlot might be compatible with multi-threading.

---

<div class="post-metadata">

### Author: ![Ferran\_Mazzanti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ferran_mazzanti/32/7458_2.png) [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)
#### Post date: [December 23, 2025, 9:28am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/3 "2025-12-23T09:28:23Z")

</div>

Hi,  
thanks for the help. The output of versioninfo() is:

Julia Version 1.12.3  
Commit 966d0af0fdf (2025-12-15 11:20 UTC)  
Build Info:  
Official [https://julialang.org](https://julialang.org) release  
Platform Info:  
OS: Linux (x86\_64-linux-gnu)  
CPU: 32 × Intel(R) Core™ i9-14900K  
WORD\_SIZE: 64  
LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)  
GC: Built with stock GC  
Threads: 8 default, 1 interactive, 8 GC (on 32 virtual cores)  
Environment:  
JULIA\_NUM\_THREADS = 8

(I’ve tried reducing from 16 to 8 threads), and LD\_LIBRARY\_PATH is empty.  
But I’ve noiticed that the crash also happens when loading other modules, even others made by myself that did work well in the same machine and OS version with previous julia releases (up to 1.11.whatever)…

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 23, 2025, 9:51am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/4 "2025-12-23T09:51:12Z")

</div>

Can you try with `julia -t 1`

?

And what is the output of:

```julia-auto
using Pkg
Pkg.status()

```

?

---

<div class="post-metadata">

### Author: ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)
#### Post date: [March 13, 2026, 12:08pm UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/5 "2026-03-13T12:08:29Z")

</div>

> [@ufechner7](#):
>
> Finally, Julia 1.12 uses more than one thread by default, which is not compatible with PyPlot. So launching Julia with:
> 
> ```julia-auto
> julia -t 1
> 
> ```
> 
> might also help.

Thanks @ufechner7 for pointing that out (link: [Julia 1.12 Highlights / New multi-threading features](https://julialang.org/blog/2025/10/julia-1.12-highlights/#new_multi-threading_features)) and thanks @Ferran_Mazzanti for posting the issue here.

I also experience julia 1.12 kernel crashes in Jupyterlab when calling `using PyPlot`.

Here is the output of `versioninfo()` when the Julia kernel is launched with the default [kernelspec file](https://jupyter-tutorial.readthedocs.io/en/24.1.0/kernels/install.html) (the one created by IJulia I guess):

```julia-auto
Julia Version 1.12.5
Commit 5fe89b8ddc1 (2026-02-09 16:05 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, tigerlake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 8 virtual cores)

```

And indeed, to make `PyPlot` work, the last line needs to be instead:

```julia-auto
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

```

Here is my modified kernelspec file (`kernel.json` which is in Jupyter [Data files folder](https://docs.jupyter.org/en/latest/use/jupyter-directories.html#data-files), e.g. on Linux `~/.local/share/jupyter/kernels/julia-1.12`)

```julia-auto
{
  "display_name":"Julia 1.12",
  "argv":[
    "/home/pierre/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/bin/julia",
    "-i",
    "--threads=1,0",
    "--color=yes",
    "--project=@.",
    "-e",
    "import IJulia; IJulia.run_kernel()",
    "{connection_file}"
  ],
  "language":"julia",
  "env":{},
  "interrupt_mode":"signal"
}

```

The only modification to the preexisting kernel is the item `"--threads=1,0"` added to the `argv` list.

---

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [March 14, 2026, 4:22am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/6 "2026-03-14T04:22:14Z")

</div>

I think I also encounter some issues with `PyPlot` on `1.12`.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [March 15, 2026, 11:47am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/7 "2026-03-15T11:47:41Z")

</div>

> [@linwaytin](#):
>
> I think I also encounter some issues with `PyPlot` on `1.12`

Easy to avoid: Start Julia with:

```julia-auto
julia -t 1,0 <other arguments>

```

or use PythonPlot.jl.

---

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [March 15, 2026, 2:53pm UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/8 "2026-03-15T14:53:12Z")

</div>

Thank you guys. That solves the problem.

---

<div class="post-metadata">

### Author: ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)
#### Post date: [May 4, 2026, 9:01pm UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/9 "2026-05-04T21:01:10Z")

</div>

The `-t 1` solution works, but I have a notebook about mutlithreaded computing and the whole point is to illustrate that using threads is a good thing. I thought this problem had gone away but it is back. PythonPlot solves the problem but telling my users to put

```julia-auto
ENV["JULIA_CONDAPKG_VERBOSITY"] = "0"
ENV["JULIA_CONDAPKG_LOG"] = "warn"

```

to avoid the pointless messages from CondaPkg will be a pain for those who do not know what a startup.jl file is.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [May 5, 2026, 1:18am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/10 "2026-05-05T01:18:25Z")

</div>

> [@ctkelley](#):
>
> PythonPlot solves the problem but telling my users to put
> 
> ```julia-auto
> ENV["JULIA_CONDAPKG_VERBOSITY"] = "0"
> ENV["JULIA_CONDAPKG_LOG"] = "warn"
> 
> ```
> 
> to avoid the pointless messages from CondaPkg will be a pain for those who do not know what a startup.jl file is.

I agree. PythonCall checks for updates far too often. That’s why I still use PyPlot. Perhaps we should create an issue?

---

<div class="post-metadata">

### Author: ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)
#### Post date: [May 5, 2026, 9:38am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/11 "2026-05-05T09:38:25Z")

</div>

I am about to do that for PythonPlot. It seems that PyPlot has problems with every new release.

---

<div class="post-metadata">

### Author: ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)
#### Post date: [May 5, 2026, 11:04am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/12 "2026-05-05T11:04:56Z")

</div>

Try putting ENV[“JULIA\_CONDAPKG\_VERBOSITY”] = “-1”  
in your startup.jl file. That seems to be working for me.  
ENV[“JULIA\_CONDAPKG\_VERBOSITY”] = “-1”

ENV[“JULIA\_CONDAPKG\_VERBOSITY”] = "-1"ENV[“JULIA\_CONDAPKG\_VERBOSITY”] = “-1”

ENV[“JULIA\_CONDAPKG\_VERBOSITY”] = “0”

---

<div class="post-metadata">

### Author: ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)
#### Post date: [May 5, 2026, 11:08am UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/13 "2026-05-05T11:08:41Z")

</div>

It’s a bit worse than that. After fighting ChatGPT for an hour. This seems to work. The problem is the pixi backend.

```julia-auto
ENV["JULIA_CONDAPKG_VERBOSITY"] = "-1"
ENV["JULIA_CONDAPKG_LOG"] = "error"
ENV["JULIA_CONDAPKG_BACKEND"] = "MicroMamba"

```

and then put a semicolon after `using PythonPlot`

I also seemed to need to cleanup some old files with

```Also
rm -rf ~/.julia/environments/v1.12/.CondaPkg
rm -rf ~/.julia/environments/v1.13/.CondaPkg

```

This seems to work but I’ve had inconsistent results with all these fixes. Sometimes I get three lines about dependencies

```julia-auto
julia> using PythonPlot;
    CondaPkg Found dependencies: /Users/ctk/.julia/packages/CondaPkg/8GjrP/CondaPkg.toml
    CondaPkg Found dependencies: /Users/ctk/.julia/packages/PythonCall/83z4q/CondaPkg.toml
    CondaPkg Found dependencies: /Users/ctk/.julia/packages/PythonPlot/oS8x4/CondaPkg.toml
    CondaPkg Dependencies already up to date

```

but most of the time I do not. YMMV.

I raised an issue with CondaPkg.

[Suppress dependency lines · Issue #216 · JuliaPy/CondaPkg.jl · GitHub](https://github.com/JuliaPy/CondaPkg.jl/issues/216))

---

<div class="post-metadata">

### Author: ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)
#### Post date: [July 30, 2026, 3:05pm UTC](https://discourse.julialang.org/t/jupyter-crashes-when-using-pyplot-and-julia-1-12/134684/14 "2026-07-30T15:05:14Z")

</div>

Just upgraded a [collection of notebooks](https://github.com/ctkelley/NotebookSIAMFANL) from PyPlot to PythonPlot. This stopped chronic kernel deaths and eliminated the need (I think) for running single threaded.

There were very few things I had to change and the only downside is the nagging from CondaPkg and the occasional

```julia-auto
SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

```

which apparently can [safely be ignored](https://discourse.julialang.org/t/another-mystery-in-ijulia/135017/4).
