# How to solve this error? About Pkg.jl and Plots.jl

**URL:** <https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265>\
**Category:** New to Julia\
**Tags:** question, package, plotting\
**Created:** [September 14, 2022, 9:26am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265 "2022-09-14T09:26:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhiwei125](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhiwei125/32/42593_2.png) [@Zhiwei125](https://discourse.julialang.org/u/Zhiwei125)\
**Post date:** [September 14, 2022, 9:26am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265/1 "2022-09-14T09:26:54Z")

</div>

import Pkg  
Pkg.build(“Plots”)  
import CSV  
import DataFrames  
import Plots

const DATA\_DIR = joinpath(@ **DIR** , “.julia\data\_julia”)  
water\_place = CSV.read(joinpath(DATA\_DIR,“water\_place.csv”), DataFrames.DataFrame)  
Plots.scatter(  
water\_place.place,  
water\_place.total\_water\_resources;  
xlabel = “place”,  
ylabel = “Height”,  
)

**Error:**

julia\> import Pkg

julia\> Pkg.build(“Plots”)  
Building GR → `C:\Users\allll\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\cf0a9940f250dc3cb6cc6c6821b4bf8a4286cf9c\build.log`  
Precompiling project…  
✓ GR  
✓ Plots  
2 dependencies successfully precompiled in 89 seconds. 276 already precompiled. 1 skipped during auto due to previous errors.  
2 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions

**After I run scatter** :

julia\> Plots.scatter(  
water\_place.place,  
water\_place.total\_water\_resources;  
xlabel = “place”,  
ylabel = “Height”,  
)  
[Info: Precompiling GR\_jll [d2c73de3-f751-5644-a686-071e5b155ba9]  
ERROR: LoadError: InitError: could not load library “C:\Users\allll.julia\artifacts\c3712e14d6f387fa0a6d1509acbdd4b8976e87d1\bin\Qt5Concurrent.dll”  
The specified module could not be found.  
Stacktrace:  
[1] dlopen(s::String, flags::UInt32; throw\_error::Bool)  
@ Base.Libc.Libdl .\libdl.jl:117  
[2] dlopen(s::String, flags::UInt32)  
@ Base.Libc.Libdl .\libdl.jl:116  
[3] macro expansion  
@ C:\Users\allll.julia\packages\JLLWrappers\QpMQW\src\products\library\_generators.jl:54 [inlined]  
[4] **init** ()  
@ Qt5Base\_jll C:\Users\allll.julia\packages\Qt5Base\_jll\lpIK6\src\wrappers\x86\_64-w64-mingw32-cxx11.jl:31  
[5] \_include\_from\_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})  
@ Base .\loading.jl:831  
[6] \_require\_search\_from\_serialized(pkg::Base.PkgId, sourcepath::String, build\_id::UInt64)  
@ Base .\loading.jl:1039  
[7] \_require(pkg::Base.PkgId)  
@ Base .\loading.jl:1315  
[8] \_require\_prelocked(uuidkey::Base.PkgId)  
@ Base .\loading.jl:1200  
[9] macro expansion  
@ .\loading.jl:1180 [inlined]  
[10] macro expansion  
@ .\lock.jl:223 [inlined]  
[11] require(into::Module, mod::Symbol)  
@ Base .\loading.jl:1144  
[12] include(mod::Module, \_path::String)  
@ Base .\Base.jl:419  
[13] top-level scope  
@ C:\Users\allll.julia\packages\JLLWrappers\QpMQW\src\toplevel\_generators.jl:188  
[14] include  
@ .\Base.jl:419 [inlined]  
[15] 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, UInt64}}, source::Nothing)  
@ Base .\loading.jl:1554  
[16] top-level scope  
@ stdin:1  
during initialization of module Qt5Base\_jll  
in expression starting at C:\Users\allll.julia\packages\GR\_jll\k8I6U\src\wrappers\x86\_64-w64-mingw32-cxx11.jl:13  
in expression starting at C:\Users\allll.julia\packages\GR\_jll\k8I6U\src\GR\_jll.jl:2  
in expression starting at stdin:1  
┌ Error: Error importing GR\_jll:  
│ exception =  
│ Failed to precompile GR\_jll [d2c73de3-f751-5644-a686-071e5b155ba9] to C:\Users\allll.julia\compiled\v1.8\GR\_jll\jl\_12D6.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:1705  
│ [3] compilecache  
│ @ .\loading.jl:1649 [inlined]  
│ [4] \_require(pkg::Base.PkgId)  
│ @ Base .\loading.jl:1337  
│ [5] \_require\_prelocked(uuidkey::Base.PkgId)  
│ @ Base .\loading.jl:1200  
│ [6] macro expansion  
│ @ .\loading.jl:1180 [inlined]  
│ [7] macro expansion  
│ @ .\lock.jl:223 [inlined]  
│ [8] require(into::Module, mod::Symbol)  
│ @ Base .\loading.jl:1144  
│ [9] eval  
│ @ .\boot.jl:368 [inlined]  
│ [10] load\_libs(always::Bool)  
│ @ GR C:\Users\allll.julia\packages\GR\uG7UO\src\funcptrs.jl:32  
│ [11] get\_func\_ptr  
│ @ C:\Users\allll.julia\packages\GR\uG7UO\src\funcptrs.jl:73 [inlined]  
│ [12] get\_func\_ptr  
│ @ C:\Users\allll.julia\packages\GR\uG7UO\src\funcptrs.jl:72 [inlined]  
│ [13] libGR\_ptr  
│ @ C:\Users\allll.julia\packages\GR\uG7UO\src\funcptrs.jl:83 [inlined]  
│ [14] setcharheight(height::Float64)  
│ @ GR C:\Users\allll.julia\packages\GR\uG7UO\src\GR.jl:1668  
│ [15] gr\_set\_font(f::Plots.Font, s::Plots.Subplot{Plots.GRBackend}; halign::Symbol, valign::Symbol, color::ColorTypes.RGB{FixedPointNumbers.N0f8}, rotation::Int64)  
│ @ Plots C:\Users\allll.julia\packages\Plots\gl4j3\src\backends\gr.jl:437  
│ [16] gr\_set\_tickfont(sp::Plots.Subplot{Plots.GRBackend}, letter::Symbol)  
│ @ Plots C:\Users\allll.julia\packages\Plots\gl4j3\src\backends\gr.jl:707  
│ [17] \_update\_min\_padding!(sp::Plots.Subplot{Plots.GRBackend})  
│ @ Plots C:\Users\allll.julia\packages\Plots\gl4j3\src\backends\gr.jl:919  
│ [18] iterate  
│ @ .\generator.jl:47 [inlined]  
│ [19] \_collect(c::Matrix{RecipesBase.AbstractLayout}, itr::Base.Generator{Matrix{RecipesBase.AbstractLayout}, typeof(Plots.\_update\_min\_padding!)}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{2})  
│ @ Base .\array.jl:807  
│ [20] collect\_similar  
│ @ .\array.jl:716 [inlined]  
│ [21] map  
│ @ .\abstractarray.jl:2933 [inlined]  
│ [22] \_update\_min\_padding!(layout::Plots.GridLayout)  
│ @ Plots C:\Users\allll.julia\packages\Plots\gl4j3\src\layouts.jl:287  
│ [23] prepare\_output(plt::Plots.Plot{Plots.GRBackend})  
│ @ Plots C:\Users\allll.julia\packages\Plots\gl4j3\src\plot.jl:247  
│ [24] show  
│ @ C:\Users\allll.julia\packages\Plots\gl4j3\src\output.jl:226 [inlined]  
│ [25] \_\_binrepr(m::MIME{Symbol(“image/svg+xml”)}, x::Plots.Plot{Plots.GRBackend}, context::Nothing)  
│ @ Base.Multimedia .\multimedia.jl:159  
│ [26] display(d::VSCodeServer.InlineDisplay, m::MIME{Symbol(“image/svg+xml”)}, x::Plots.Plot{Plots.GRBackend})  
│ @ VSCodeServer c:\Users\allll.vscode\extensions\julialang.language-julia-1.7.12\scripts\packages\VSCodeServer\src\display.jl:0  
│ [27] display(d::VSCodeServer.InlineDisplay, mime::String, x::Any)  
│ @ Base.Multimedia .\multimedia.jl:216  
│ [28] display(d::VSCodeServer.InlineDisplay, x::Plots.Plot{Plots.GRBackend})  
│ @ VSCodeServer c:\Users\allll.vscode\extensions\julialang.language-julia-1.7.12\scripts\packages\VSCodeServer\src\display.jl:165  
│ [29] display(x::Any)  
│ @ Base.Multimedia .\multimedia.jl:328  
│ [30] #invokelatest#2  
│ @ .\essentials.jl:729 [inlined]  
│ [31] invokelatest  
│ @ .\essentials.jl:726 [inlined]  
│ [32] print\_response(errio::IO, response::Any, show\_value::Bool, have\_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})  
│ @ REPL C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\REPL.jl:296  
│ [33] (::REPL.var"#45#46"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)  
│ @ REPL C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\REPL.jl:278  
│ [34] with\_repl\_linfo(f::Any, repl::REPL.LineEditREPL)  
│ @ REPL C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\REPL.jl:521  
│ [35] print\_response(repl::REPL.AbstractREPL, response::Any, show\_value::Bool, have\_color::Bool)  
│ @ REPL C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\REPL.jl:276  
│ [36] (::REPL.var"#do\_respond#66"{Bool, Bool, REPL.var"#77#87"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)  
│ @ REPL C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\REPL.jl:857  
│ [37] (::VSCodeServer.var"#98#101"{REPL.var"#do\_respond#66"{Bool, Bool, REPL.var"#77#87"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt}})(mi::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)  
│ @ VSCodeServer c:\Users\allll.vscode\extensions\julialang.language-julia-1.7.12\scripts\packages\VSCodeServer\src\repl.jl:122  
│ [38] #invokelatest#2  
│ @ .\essentials.jl:729 [inlined]  
│ [39] invokelatest  
│ @ .\essentials.jl:726 [inlined]  
│ [40] run\_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)  
│ @ REPL.LineEdit C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\LineEdit.jl:2510  
│ [41] run\_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)  
│ @ REPL C:\Users\allll\AppData\Local\Programs\Julia-1.8.1\share\julia\stdlib\v1.8\REPL\src\REPL.jl:1248  
│ [42] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()  
│ @ REPL .\task.jl:484  
└ @ GR C:\Users\allll.julia\packages\GR\uG7UO\src\funcptrs.jl:38  
Your GR installation is incomplete. Rerunning build step for GR package.  
┌ Info: Switching provider to GR due to error in depsfile  
└ depsfile = “C:\Users\allll\.julia\packages\GR\uG7UO\deps\deps.jl”  
┌ Info: Emptying depsfile. GR provider is GR  
│ provider = “GR”  
└ depsfile = “C:\Users\allll\.julia\packages\GR\uG7UO\deps\deps.jl”  
[ Info: Downloading pre-compiled GR 0.66.2 Windows binary

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/f/4f6742f0122045eefb6f99638bef21c23278d9e4.jpeg)

---

<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:** [September 14, 2022, 9:53am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265/2 "2022-09-14T09:53:54Z")

</div>

How did you install Julia?

Aldo does `C:\Users\allll.julia\artifacts\c3712e14d6f387fa0a6d1509acbdd4b8976e87d1\bin\Qt5Concurrent.dll` exist?

One quick check you can try is to rename `C:\Users\allll.julia` to something else, then reinstall plots to see if that works.

---

<div class="post-metadata">

**Author:** ![Zhiwei125](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhiwei125/32/42593_2.png) [@Zhiwei125](https://discourse.julialang.org/u/Zhiwei125)\
**Post date:** [September 14, 2022, 9:57am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265/3 "2022-09-14T09:57:31Z")

</div>

Thanks a lot! I will try it!

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [September 14, 2022, 11:35am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265/4 "2022-09-14T11:35:57Z")

</div>

Use a triple backtick fence to make your code legible.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

<div class="post-metadata">

**Author:** ![Zhiwei125](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhiwei125/32/42593_2.png) [@Zhiwei125](https://discourse.julialang.org/u/Zhiwei125)\
**Post date:** [September 14, 2022, 11:41am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265/5 "2022-09-14T11:41:11Z")

</div>

Thanks a lot !!!  
Thanks!!!

---

<div class="post-metadata">

**Author:** ![Zhiwei125](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhiwei125/32/42593_2.png) [@Zhiwei125](https://discourse.julialang.org/u/Zhiwei125)\
**Post date:** [September 14, 2022, 11:58am UTC](https://discourse.julialang.org/t/how-to-solve-this-error-about-pkg-jl-and-plots-jl/87265/6 "2022-09-14T11:58:07Z")

</div>

I did it!  
Thanks for your help!  
Have a good day!
