# ERROR: LoadError: InitError: UndefVarError: \`GR\_jll\` not defined

**URL:** https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945
**Category:** General Usage
**Tags:** question, package, plots
**Created:** [February 29, 2024, 12:13pm UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945 "2024-02-29T12:13:02Z")
**Posts on this page:** 12
**Page:** 2

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 6:34am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/21 "2024-03-01T06:34:36Z")

</div>

> [@mkitti](#):
>
> Have you tried [Makie.jl](https://juliahub.com/ui/Packages/General/Makie) ?

Disaster: There was also an error when adding `WGLMakie.jl`, just when I thought it looked better for me.

```julia
Precompiling project...
  ✗ Bonito
  ✗ MathOptInterface
  ✗ Plots → GeometryBasicsExt
  ✗ MathTeXEngine
  ✗ Plots → FileIOExt
  ✗ Optim
  ✗ Makie
  ✗ WGLMakie
  163 dependencies successfully precompiled in 2596 seconds. 168 already precompiled. 3 skipped during auto due to previous errors. 8 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages 1 dependency had output during precompilation:
┌ MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7]
│ Downloading artifact: MKL
└  

```

---

<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: [March 1, 2024, 6:34am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/22 "2024-03-01T06:34:37Z")

</div>

Did you restart Julia after to download the GR binaries?

---

<div class="post-metadata">

### Author: ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)
#### Post date: [March 1, 2024, 6:40am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/23 "2024-03-01T06:40:05Z")

</div>

> [@WuSiren](#):
>
> I did get an error when `using GR_jll`:

Well that settles the `GR_jll` mystery then, Qt6 is not compatible with Windows 7. You can restrict the `GR_jll` compat to version `0.72.8` to force it to use Qt5.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 6:55am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/24 "2024-03-01T06:55:08Z")

</div>

Yes, I did.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 7:00am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/25 "2024-03-01T07:00:12Z")

</div>

May I beg your advice on how to do that? Please forgive me for not so familiar with it yet.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 7:06am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/26 "2024-03-01T07:06:47Z")

</div>

Will it work if I use an older version of `Plots.jl` or `WGLMakie.jl`? Then how old should they be?

---

<div class="post-metadata">

### Author: ![barche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barche/32/79_2.png) [@barche](https://discourse.julialang.org/u/barche)
#### Post date: [March 1, 2024, 7:10am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/27 "2024-03-01T07:10:51Z")

</div>

After going into Pkg mode (`]` key) do:

```julia
pin GR_jll@0.72.8

```

That should make sure GR and Plots are all downgraded appropriately.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 8:31am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/28 "2024-03-01T08:31:15Z")

</div>

> [@Plots, InitError: UndefVarError: GR\_jll not defined](https://discourse.julialang.org/t/plots-initerror-undefvarerror-gr-jll-not-defined/102448/2):
>
> A persistent error such as this may require the following command to force GR to recompile. Base.compilecache(Base.identify\_package("GR")) This situation occurs due to some initial problem with loading GR\_jll on this line: However, due to the surrounding try-catch the problem is ignored and compilation continues. Once the compilation succeeds, the issue may persist if Julia fails to recognize the need to invalidate the compile cache for GR. If the above does not resolve the issue, first as…

I made a new attempt, referring to the above operations:

1. Create a new folder `D:/NewEnv` and `activate` it in julia pkg mode.
2. `(NewEnv) pkg> add GR_jll` , `(NewEnv) pkg> pin GR_jll@0.72.8` and `julia> import GR_jll`.
3. `(NewEnv) pkg> add GR`,  
`julia> Base.compilecache(Base.identify_package("GR"))`, and  
`using GR`.
4. `GR.plot(rand(10))` and it reports:

```julia
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x1338b47 -- jl_svecref at C:/workdir/src\julia.h:989 [inlined]
jl_array_grow_at_end at C:/workdir/src\array.c:880
in expression starting at REPL[8]:1
jl_svecref at C:/workdir/src\julia.h:989 [inlined]
jl_array_grow_at_end at C:/workdir/src\array.c:880
ijl_array_grow_end at C:/workdir/src\array.c:955
_growend! at .\array.jl:1014 [inlined]
push! at .\array.jl:1061 [inlined]
load_libs at C:\Users\Admin\.julia\packages\GR\CMI3m\src\funcptrs.jl:54
init at C:\Users\Admin\.julia\packages\GR\CMI3m\src\GR.jl:305
init at C:\Users\Admin\.julia\packages\GR\CMI3m\src\GR.jl:304 [inlined]
plot_data at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1177
plot_data at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1173 [inlined]
plot_data at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1173 [inlined]
#plot#39 at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1746
plot at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1737
unknown function (ip: 1a3f8925)
_jl_invoke at C:/workdir/src\gf.c:2758 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:226
eval_stmt_value at C:/workdir/src\interpreter.c:177 [inlined]
eval_body at C:/workdir/src\interpreter.c:606
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:762
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:912
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:856
ijl_toplevel_eval at C:/workdir/src\toplevel.c:921 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:971
eval at .\boot.jl:370 [inlined]
eval_user_input at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:153
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:249
#start_repl_backend#46 at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:234
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:231
jl_fptr_args at C:/workdir/src\gf.c:2405
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
#run_repl#59 at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:379
run_repl at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:365
jfptr_run_repl_60824 at D:\Software\julia-1.9.4\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
#1018 at .\client.jl:421
jfptr_YY.1018_55137 at D:\Software\julia-1.9.4\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:774
#invokelatest#2 at .\essentials.jl:819 [inlined]
invokelatest at .\essentials.jl:816 [inlined]
run_main_repl at .\client.jl:405
exec_options at .\client.jl:322
_start at .\client.jl:522
jfptr__start_45063 at D:\Software\julia-1.9.4\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
true_main at C:/workdir/src\jlapi.c:573
jl_repl_entrypoint at C:/workdir/src\jlapi.c:717
jl_load_repl at C:/workdir/cli\loader_lib.c:529
mainCRTStartup at C:/workdir/cli\loader_exe.c:59
BaseThreadInitThunk at C:\Windows\system32\kernel32.dll (unknown line)
RtlInitializeExceptionChain at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlInitializeExceptionChain at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 13682505 (Pool: 13677265; Big: 5240); GC: 40
PS D:\NewEnv>

```

How I wish it worked…

---

<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: [March 1, 2024, 8:34am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/29 "2024-03-01T08:34:01Z")

</div>

What version of GR did you install?

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 8:37am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/30 "2024-03-01T08:37:33Z")

</div>

```julia
(NewEnv) pkg> st
Status `D:\NewEnv\Project.toml`
⌃ [28b8d3ca] GR v0.72.8
⌅ [d2c73de3] GR_jll v0.72.8+0 ⚲
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgr
ading. To see why use `status --outdated`

```

Thank you very very much for your patient help! ! !

---

<div class="post-metadata">

### Author: ![xgdgsc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xgdgsc/32/608_2.png) [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)
#### Post date: [March 1, 2024, 8:56am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/31 "2024-03-01T08:56:33Z")

</div>

Try [JuliaComputing/PlotlyLight.jl: Plotly.js via Julia made easy. (github.com)](https://github.com/JuliaComputing/PlotlyLight.jl) instead?

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 9:19am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/32 "2024-03-01T09:19:30Z")

</div>

Cool! It works very well for the moment. Many thanks!! 🤝 🤝

[Previous page](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945.md?page=1)
