Plots not finishing in Julia 1.9.2

I made the update from Julia 1.8.5 to Julia 1.9.2. Now, cells containing plots are no longer running. I was wondering if I just had to wait longer, so I ran the following code in a Julia 1.9.2 kernel as a test:

using Plots; plotlyjs()

I waited for 35 minutes. The package ran quickly, less than a minute approximately, but the plot never showed up and the plot cell never finished running.

I changed the kernel back to 1.8.5 and the entirety of the code finished in under a minute, as I would expect.

It may help you to know that I use a thinkpad running Windows 11 and I update Julia using the Updatejulia package.

Any suggestions?

Did you make sure to update the kernel to use the new julia version?

Edit: On second thought, if some of the code ran it seems like the kernel worked then, so maybe not the problem?

That seems odd…

You’re using a notebook, which, Pluto?

I’m not on Windows (which I doubt is the problem, but can’t rule out), and I’m using the REPL, not a notebook, and I can plot with using your code, in 1.9.2. I could plot in a fraction of a second, for second plot, but it took a few seconds for the first…

(@v1.9) pkg> st
Status `~/.julia/environments/v1.9/Project.toml`
βŒƒ [13f3f980] CairoMakie v0.10.2
βŒƒ [e9467ef8] GLMakie v0.8.2
βŒ… [20f20a25] MakieCore v0.6.2
  [f0f68f2c] PlotlyJS v0.18.10
  [91a5bcdd] Plots v1.38.17
Info Packages marked with βŒƒ and βŒ… have new versions available, but those with βŒ… are restricted by compatibility constraints from upgrading. To see why use `status --outdated`

The β€œβŒƒ and βŒ…β€ need not be a problem, while ideally you don’t want to see them in front of the (plotting) packages you use, in this case PlotlyJS AND Plots). While [GL]Makie is a plotting package, it’s a different one, and you don’t need to see anything related to it, since you’re not using it, otherwise same advice would apply. In your case you would like Pluto and/or IPython or whatever you’re using to additionally be at the latest version. I tried installing them, and it worked, though I got a downgrade…:

βŒ… [34da2185] ↓ Compat v4.9.0 β‡’ v3.46.2

This is considered ok to do for the package manager, since any combination of packages should be safe (and IPython insists), but that may not be the case…, and this is not a problem for IPython, but could be for other packages (if their Projects.toml file is wrong).

See below on possible segfault, that I encountered, and solution. What I did:

julia> using Plots; plotlyjs()
ERROR: ArgumentError: Package Plots not found in current path.
- Run `import Pkg; Pkg.add("Plots")` to install the Plots package.

I’m not sure why I got (an unrelated error, that could have been your issue for your relevant package, I have unusually large environment, but it still should have worked the first time around, compiling Makie):

julia> using PlotlyJS
 β”‚ Package PlotlyJS not found, but a package named PlotlyJS is available from a registry. 
 β”‚ Install package?
 β”‚   (@v1.9) pkg> add PlotlyJS 
 β”” (y/n/o) [y]: y
   Resolving package versions...
   Installed WebSockets ──────────── v1.6.0
   Installed PlotlyBase ──────────── v0.8.19
   Installed Kaleido_jll ─────────── v0.2.1+0
   Installed Mustache ────────────── v1.0.17
   Installed Blink ───────────────── v0.12.8
   Installed FunctionalCollections ─ v0.5.0
   Installed Widgets ─────────────── v0.6.6
   Installed WebIO ───────────────── v0.8.21
   Installed JSExpr ──────────────── v0.5.4
   Installed PlotlyJS ────────────── v0.18.10
  Downloaded artifact: plotly-base-artifacts
  Downloaded artifact: web
  Downloaded artifact: electronjs_app
  Downloaded artifact: plotly-artifacts
  Downloaded artifact: Kaleido
    Updating `~/.julia/environments/v1.9/Project.toml`
  [f0f68f2c] + PlotlyJS v0.18.10
    Updating `~/.julia/environments/v1.9/Manifest.toml`
  [bf4720bc] + AssetRegistry v0.1.0
  [ad839575] + Blink v0.12.8
  [de31a74c] + FunctionalCollections v0.5.0
  [9fb69e20] + Hiccup v0.2.2
  [97c1335a] + JSExpr v0.5.4
  [50d2b5c4] + Lazy v0.15.1
  [ffc61752] + Mustache v1.0.17
  [a975b10e] + Mux v1.0.1
  [d96e819e] + Parameters v0.12.3
  [a03496cd] + PlotlyBase v0.8.19
  [f0f68f2c] + PlotlyJS v0.18.10
  [3a884ed6] + UnPack v1.0.2
  [0f1e0344] + WebIO v0.8.21
  [104b5d7c] + WebSockets v1.6.0
  [cc8bc4a8] + Widgets v0.6.6
  [f7e6163d] + Kaleido_jll v0.2.1+0
    Building WebIO ───→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/0eef0765186f7452e52236fa42ca8c9b3c11c6e3/build.log`
    Building PlotlyJS β†’ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7452869933cd5af22f59557390674e8679ab2338/build.log`
Precompiling project...
  βœ“ Plots
  43 dependencies successfully precompiled in 297 seconds. 264 already precompiled.
  1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
Segmentation fault (core dumped)

As you see there β€œβœ“ Plots” Plots was precompiled for me. And I believe I saw Makie after that being precompiled, and I suppose it didn’t finish precompiling, possibly it was buggy in the old version (I’ve never before had a segfault while precompiling, though I often get OOM because of parallel precompilation, so I frequently CTRL-C to stop it, I didn’t in this case).

Without working on fixing that (likely or potential problem), plotting with the other, what you are using, worked for me.

If you had gotten a segfault for Plots or PlotlyJS for some reason (running out of memory should not be it), then I wouldn’t expect that package, or any relevant it happened to to succeed.

I did this since I got a segfault (and didn’t see it again, so I suppose Makie would work if I would test it), also to updated versions just in case:

(@v1.9) pkg> up
   Updating `~/.julia/environments/v1.9/Project.toml`
  [13f3f980] ↑ CairoMakie v0.10.2 β‡’ v0.10.8
  [e9467ef8] ↑ GLMakie v0.8.2 β‡’ v0.8.8
  [c43c736e] ↑ Genie v5.15.0 β‡’ v5.18.1
  [20f20a25] ↑ MakieCore v0.6.2 β‡’ v0.6.5
  [6099a3de] ↑ PythonCall v0.9.12 β‡’ v0.9.14
    Updating `~/.julia/environments/v1.9/Manifest.toml`
  [621f4979] ↑ AbstractFFTs v1.3.0 β‡’ v1.5.0

Precompiling project...
  Progress [========================================>]  269/272
  βœ“ Libgcrypt_jll
  βœ“ Plots
  βœ“ PlotlyJS
  β—“ Makie

The spinner before make didn’t copy-paste correctly, eventually it went away, and was replaced by:

  β—“ GLMakie

this finished successfully with:

  272 dependencies successfully precompiled in 370 seconds. 79 already precompiled.
  112 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
  2 dependencies had warnings during precompilation:
β”Œ micromamba_jll [f8abcde7-e9b7-5caa-b8af-a437887ae8e4]
β”‚   Downloading artifact: micromamba
β”Œ MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7]
β”‚   Downloading artifact: MKL
[ Info: We haven't cleaned this depot up for a bit, running Pkg.gc()...
      Active manifest files: 13 found
      Active artifact files: 218 found
      Active scratchspaces: 23 found
     Deleted 86 package installations (175.134 MiB)
     Deleted 7 repos (366.037 KiB)
     Deleted 7 artifact installations (206.124 MiB)
     Deleted 48 scratchspaces (7.631 KiB)

Yes, the kernel is updated for the new version. Thanks for the idea though.

Thank you so much. This worked!

1 Like