# Problem with StatsPlots

**URL:** <https://discourse.julialang.org/t/problem-with-statsplots/60155>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [April 28, 2021, 9:38am UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155 "2021-04-28T09:38:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![PCM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pcm/32/24494_2.png) [@PCM](https://discourse.julialang.org/u/PCM)\
**Post date:** [April 28, 2021, 9:38am UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/1 "2021-04-28T09:38:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 28, 2021, 9:59am UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/2 "2021-04-28T09:59:56Z")

</div>

Welcome, @PCM  
Checkout this guide for troubleshooting GR:

> [@GR build problems: "installation is incomplete"](https://discourse.julialang.org/t/gr-build-problems-installation-is-incomplete/58764/22):
>
> Background: GR Binaries There are two ways to provide binaries for GR which hinge on the environmental variable JULIA\_GR\_PROVIDER. You can evaluate that environmental variable by checking the value of ENV["JULIA\_GR\_PROVIDER"] within Julia or use operating system and shell specific means outside of Julia. The two methods are “BinaryBuilder” and “GR” with “BinaryBuilder” being preferred. [https://github.com/jheinen/GR.jl/blob/master/deps/build.jl#L70-L92](https://github.com/jheinen/GR.jl/blob/master/deps/build.jl#L70-L92) The BinaryBuilder binary provider method u…

---

<div class="post-metadata">

**Author:** ![PCM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pcm/32/24494_2.png) [@PCM](https://discourse.julialang.org/u/PCM)\
**Post date:** [April 28, 2021, 10:43am UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/3 "2021-04-28T10:43:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 28, 2021, 2:49pm UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/4 "2021-04-28T14:49:42Z")

</div>

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.

```julia
(@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.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 28, 2021, 3:00pm UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/5 "2021-04-28T15:00:22Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![PCM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pcm/32/24494_2.png) [@PCM](https://discourse.julialang.org/u/PCM)\
**Post date:** [April 28, 2021, 3:24pm UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/6 "2021-04-28T15:24:58Z")

</div>

@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 🙂 Claus

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 28, 2021, 5:08pm UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/7 "2021-04-28T17:08:13Z")

</div>

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

```julia
julia> using GR

julia> GR.gr_provider[]
"BinaryBuilder"

```

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

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 28, 2021, 5:10pm UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/8 "2021-04-28T17:10:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 28, 2021, 8:46pm UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/9 "2021-04-28T20:46:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PCM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pcm/32/24494_2.png) [@PCM](https://discourse.julialang.org/u/PCM)\
**Post date:** [April 29, 2021, 10:35am UTC](https://discourse.julialang.org/t/problem-with-statsplots/60155/10 "2021-04-29T10:35:50Z")

</div>

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 ?
