Problem with StatsPlots

Hi, I am using Statsplots and Turing in a Jupyter notebook. I got the error message, below. M y configuration is (that’s what “] status” says): Julia 1.6.1, IJulia v1.23.2, StatsPlots v0.14.20, Turing v0.15.16, Pluto v0.14.4. I don’t know how to debug this bug. Thanks, Claus
┌ Error: Error importing GR_jll:
│ err = InitError(:GR_jll, ErrorException("could not load library "C:\Users\claus\.julia\artifacts\7cf489c280ce03e932b09698ef4d949827fd9c55\bin\libGKS.dll"\nThe specified module could not be found. "))
└ @ GR C:\Users\claus.julia\packages\GR\Hsil0\src\funcptrs.jl:36

Welcome, @PCM
Checkout this guide for troubleshooting GR:

2 Likes

Thanks @oheil for the hint. I have to study this …

Welcome to Julia.

GR should try to recover itself automatically and switch over to the tarball method of providing the binaries.

What happens after that message? Do you see a plot?

To diagnose further, press “]” to access the Pkg mode. That might be provide some more details.

(@v1.6) pkg> activate --temp
  Activating new environment at `C:\Users\KITTIS~1\AppData\Local\Temp\jl_ERjaUY\Project.toml`

(jl_ERjaUY) pkg> add GR_jll
...
julia> using GR_jll

The above will attempt to load GR_jll directly and provide the full stack trace of what went wrong.

1 Like

If you just want a plot, then try this which will you switch you over to the tarball method of obtaining the binaries.

julia> ENV["JULIA_GR_PROVIDER"] = "GR"

(@v1.6) pkg> activate --temp
  Activating new environment at `C:\Users\KITTIS~1\AppData\Local\Temp\jl_ERjaUY\Project.toml`

(jl_ERjaUY) pkg> add GR
...

(jl_ERjaUY) pkg> build GR

julia> using GR
1 Like

@mkitti, I followed you last recommendation. The plot was ok, no error message. Before, I got the plot followed by the error message. I hope that this fix is not temporarily. Thanks, for the moment.
@mkitti, it seems that the error message disappeared permanently. A bit mysterious to me is the fact that ENV[“JULIA_GR_PROVIDER”] ist still unknown. The message is “key JULIA_GR_PROVIDER not found”. But anyway, thanks for all people helping me, for the moment :slight_smile: Claus

1 Like

If you would like to probe the value of GR provider do this:

julia> using GR

julia> GR.gr_provider[]
"BinaryBuilder"

I suspect yours will probably say “GR” and that the binaries live at GR.grdir_default

If you would still like to explore what went wrong with GR_jll, you should be able to still follow those steps without messing up your configuration.

This is the first time I’ve seen GR_jll fail on Windows. I guess we’ll see if this is an isolated case.

I was looking into my files “C:\users\claus\.julia\packages\BinaryProvider\…” I’ve found only four files which seem to have no relation to GR.jll: GeAtj, kcGx0, TcAwt, U2dlck. Is it better to shuffle a GR-related binary to the folder BinaryProvider ?