JuliaPlots / PlotlyJS.jl

Julia library for plotting with plotly.js
Other
413 stars 77 forks source link

"Kaleido is not available on this system" (Windows 11) #454

Closed maucejo closed 1 year ago

maucejo commented 1 year ago

Hi all,

I am running Julia on Windows 11 and I am facing a "Kaleido" issue that has been reported elsewhere on the Web. More explicitly, I receive the following warning when I try to use PlotlyJS:

julia> using PlotlyJS
julia> ┌ Warning: Kaleido is not available on this system. Julia will be unable to save images of any plots.
└ @ PlotlyJS C:\Users\maucejo\.julia\packages\PlotlyJS\Jj38U\src\kaleido.jl:65
┌ Warning: ErrorException("Could not start Kaleido process")
└ @ PlotlyJS C:\Users\maucejo\.julia\packages\PlotlyJS\Jj38U\src\kaleido.jl:66

Here is the ouput of versioninfo()

Julia Version 1.8.2
Commit 36034abf26 (2022-09-29 15:21 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores

The output of ] st

Status `C:\Users\maucejo\.julia\environments\v1.8\Project.toml`
  [6e4b80f9] BenchmarkTools v1.3.2
  [13f3f980] CairoMakie v0.9.2
  [a93c6f00] DataFrames v1.4.2
  [e9467ef8] GLMakie v0.7.2
  [7073ff75] IJulia v1.23.3
  [b964fa9f] LaTeXStrings v1.3.0
  [7031d0ef] LazyGrids v0.4.0
  [7ed4a6bd] LinearSolve v1.27.1
  [14b8a8f1] PkgTemplates v0.7.29
  [a03496cd] PlotlyBase v0.8.19
  [f0f68f2c] PlotlyJS v0.18.10
  [91a5bcdd] Plots v1.35.8
 [c3e4b0f8] Pluto v0.19.9
  [33c8b6b6] ProgressLogging v0.1.4
  [295af30f] Revise v3.4.0
  [37e2e46d] LinearAlgebra
  [2f01184e] SparseArrays

To try to solve this issue, I tried to:

Unfortunately, none of the previous actions solved the problem. I am out of solution. Does someone find a solution ?

FYI, I ha en't this problem on Linux (Arch).

Thank you for your help.

maucejo commented 1 year ago

I actually found the source of the bug and now everything works as expected. For those having the same problem, the issue is neither related to PlotlyJS.jl or kaleido. It is a Windows 11 issue and more precisely a cmd prompt issue.

Kaleido won't work if, when opening the cmd prompt, the error message Process Exited With Code 1 appears. In this case kaleido.cmd doesn't run, which leads to the warning Kaleido is not available on this system.

To solve this issue, you have to open Powershell as administrator and type C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f (see link for details). After a restart of your terminal, the problem is normally solved.