Plots, InitError GR_jll not defined

Hi, im new to Julia and wanted to try out some plotting with the Plots-Package. Did run into similar problems as:

or:

but the solution did not work out for me. I got the

GR.plot(rand(10))

to work, but “using Plots” still yields this error:
ERROR: LoadError: InitError: UndefVarError: GR_jll not defined
Stacktrace:
[1] init()
@ GR.GRPreferences C:\Users\thoma.julia\packages\GR\yBe3g\src\preferences.jl:64
[2] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1115
[3] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base .\loading.jl:1061
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
@ Base .\loading.jl:1506
[5] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1783
[6] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1660
[7] macro expansion
@ .\loading.jl:1648 [inlined]
[8] macro expansion
@ .\lock.jl:267 [inlined]
[9] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611
[10] top-level scope
@ C:\Users\thoma.julia\packages\Plots\sxUvK\src\backends.jl:402
[11] eval
@ .\boot.jl:370 [inlined]
[12] _initialize_backend(pkg::Plots.GRBackend)
@ Plots C:\Users\thoma.julia\packages\Plots\sxUvK\src\backends.jl:401
[13] backend(pkg::Plots.GRBackend)
@ Plots C:\Users\thoma.julia\packages\Plots\sxUvK\src\backends.jl:266
[14] backend(sym::Symbol)
@ Plots C:\Users\thoma.julia\packages\Plots\sxUvK\src\backends.jl:276
[15] load_default_backend()
@ Plots C:\Users\thoma.julia\packages\Plots\sxUvK\src\backends.jl:207
[16] backend()
@ Plots C:\Users\thoma.julia\packages\Plots\sxUvK\src\backends.jl:254
[17] top-level scope
@ C:\Users\thoma.julia\packages\Plots\sxUvK\src\init.jl:83
[18] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[19] include(x::String)
@ Plots C:\Users\thoma.julia\packages\Plots\sxUvK\src\Plots.jl:1
[20] top-level scope
@ C:\Users\thoma.julia\packages\Plots\sxUvK\src\Plots.jl:176
[21] include
@ .\Base.jl:457 [inlined]
[22] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2049
[23] top-level scope
@ stdin:3
during initialization of module GRPreferences
in expression starting at C:\Users\thoma.julia\packages\Plots\sxUvK\src\init.jl:83
in expression starting at C:\Users\thoma.julia\packages\Plots\sxUvK\src\Plots.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to “C:\Users\thoma\.julia\compiled\v1.9\Plots\jl_3071.tmp”.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:2294
[3] compilecache
@ .\loading.jl:2167 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1805
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1660
[6] macro expansion
@ .\loading.jl:1648 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611

Maybe someone has another idea what to do.

Thank u :slight_smile:

1 Like