Hello. I have just installed julia 1.5 and when I run using Plots, I get the following message saying that precompilation has failed:
ERROR: LoadError: InitError: could not load library "C:\Users\Administrator.julia\artifacts\52d195e9e73e7321d06ad9980656174ac0464ed4\bin\avdevice-58.dll"
The specified module could not be found.
Stacktrace:
[1] dlopen(::String, ::UInt32; throw_error::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109
[2] dlopen at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Libdl\src\Libdl.jl:109 [inlined] (repeats 2 times)
[3] __init__() at C:\Users\Administrator.julia\packages\FFMPEG_jll\tCUYA\src\wrappers\x86_64-w64-mingw32.jl:231
[4] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:697
[5] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:782
[6] _require(::Base.PkgId) at .\loading.jl:1007
[7] require(::Base.PkgId) at .\loading.jl:928
[8] require(::Module, ::Symbol) at .\loading.jl:923
[9] include(::Function, ::Module, ::String) at .\Base.jl:380
[10] include(::Module, ::String) at .\Base.jl:368
[11] top-level scope at none:2
[12] eval at .\boot.jl:331 [inlined]
[13] eval(::Expr) at .\client.jl:467
[14] top-level scope at .\none:3
during initialization of module FFMPEG_jll
in expression starting at C:\Users\Administrator.julia\packages\FFMPEG\vocw2\src\FFMPEG.jl:3
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to C:\Users\Administrator.julia\compiled\v1.5\FFMPEG\TGvga_4mW7P.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1290
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923
[6] include(::Function, ::Module, ::String) at .\Base.jl:380
[7] include(::Module, ::String) at .\Base.jl:368
[8] top-level scope at none:2
[9] eval at .\boot.jl:331 [inlined]
[10] eval(::Expr) at .\client.jl:467
[11] top-level scope at .\none:3
in expression starting at C:\Users\Administrator.julia\packages\Plots\LWw1t\src\Plots.jl:15
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\Users\Administrator.julia\compiled\v1.5\Plots\ld3vC_4mW7P.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1290
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923
This bug occurs on ( insert x below )
Backend | yes | no | untested
-------------|-----|-----|---------
gr (default) | x | |
pyplot | | | x
plotly | | | x
plotlyjs | | | x
pgfplotsx | | | x
inspectdr | | | x
Plots.jl version: 1.5.7
Backend version: GR v0.51.0
Output of :
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = "C:\Users\Administrator\AppData\Local\atom\app-1.49.0\atom.exe" -a
JULIA_NUM_THREADS = 12
Same here:
(ergmjl) pkg> precompile
Precompiling project...
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: could not load library "/Users/adamhaber/.julia/artifacts/dbb254dca678145c7d79410e96da494cc94f8a13/lib/libavdevice.58.5.100.dylib"
dlopen(/Users/adamhaber/.julia/artifacts/dbb254dca678145c7d79410e96da494cc94f8a13/lib/libavdevice.58.5.100.dylib, 1): Library not loaded: @rpath/libx264.157.dylib
Referenced from: /Users/adamhaber/.julia/artifacts/dbb254dca678145c7d79410e96da494cc94f8a13/lib/libavdevice.58.5.100.dylib
Reason: image not found
Stacktrace:
[1] dlopen(::String, ::UInt32; throw_error::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109
[2] dlopen at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
[3] __init__() at /Users/adamhaber/.julia/packages/FFMPEG_jll/tCUYA/src/wrappers/x86_64-apple-darwin14.jl:231
[4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
[5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:781
[6] _require(::Base.PkgId) at ./loading.jl:1006
[7] require(::Base.PkgId) at ./loading.jl:927
[8] require(::Module, ::Symbol) at ./loading.jl:922
[9] include(::Module, ::String) at ./Base.jl:377
[10] top-level scope at none:2
[11] eval at ./boot.jl:331 [inlined]
[12] eval(::Expr) at ./client.jl:449
[13] top-level scope at ./none:3
during initialization of module FFMPEG_jll
in expression starting at /Users/adamhaber/.julia/packages/FFMPEG/vocw2/src/FFMPEG.jl:3
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /Users/adamhaber/.julia/compiled/v1.4/FFMPEG/TGvga_EvpPl.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922
[6] include(::Module, ::String) at ./Base.jl:377
[7] top-level scope at none:2
[8] eval at ./boot.jl:331 [inlined]
[9] eval(::Expr) at ./client.jl:449
[10] top-level scope at ./none:3
in expression starting at /Users/adamhaber/.julia/packages/Plots/LWw1t/src/Plots.jl:15
the same thing: Plots on windows 10
tried to re-built FFMPEG.jl, did not work
] add FFMPEG # works
using FFMPEG # throws the error "The specified module could not be found"
# ERROR: LoadError: InitError: could not load library
# .....\artifacts\52d195e9e73e7321d06ad9980656174ac0464ed4\bin\avdevice-58.dll"
# The specified module could not be found.
the same thing:
Plotson windows 10tried to re-built
FFMPEG.jl, did not work] add FFMPEG # works using FFMPEG # throws the error "The specified module could not be found" # ERROR: LoadError: InitError: could not load library # .....\artifacts\52d195e9e73e7321d06ad9980656174ac0464ed4\bin\avdevice-58.dll" # The specified module could not be found.
I also tried this, based on the comments from other threads, but it also did not work and I get basically the same error
I tried the solution referenced here https://github.com/JuliaIO/FFMPEG.jl/issues/33#issuecomment-668002001, which is to do ]add [email protected]
I now get the error:
โ Error: evaluation error starting at C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:9
โ mod = PlotThemes
โ ex =
โ quote
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:3 =#
โ if Juno.isactive()
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:4 =#
โ colors = Juno.syntaxcolors()
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:5 =#
โ colors = Dict((k => parse(Colorant, "#" * Base.hex(v, 6, false)) for (k, v) = colors))
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:7 =#
โ juno_palette = unique([colors[k] for k = keys(colors) if k โ ["background", "variable"]])
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:9 =#
โ colvec = sort(HSV.(juno_palette), lt = ((a, b)->begin
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:9 =#
โ a.h < b.h
โ end))
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:10 =#
โ filter!((c->begin
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:10 =#
โ c.s > 0.5 * mean((c->begin
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:10 =#
โ c.s
โ end), colvec)
โ end), colvec)
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:11 =#
โ grad = Vector{eltype(colvec)}()
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:12 =#
โ for i = 1:length(colvec) - 1
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:13 =#
โ append!(grad, range(colvec[i], stop = colvec[i + 1]))
โ end
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:16 =#
โ global _themes
โ #= C:\Users\Administrator.julia\packages\PlotThemes\4DCOG\src\juno_smart.jl:17 =#
โ _themes[:juno] = PlotTheme(bg = colors["background"], bginside = colors["background"], fg = colors["variable"], fgtext = colors["variable"], fgguide = colors["variable"], fglegend = colors["variable"], palette = expand_palette(colors["background"], juno_palette; lchoices = [57], cchoices = [100]), colorgradient = grad)
โ end
โ end
โ exception =
โ MethodError: Cannotconvertan object of type Tuple{LineNumberNode,Expr} to an object of type Array{Tuple{LineNumberNode,Expr},1}
โ Closest candidates are:
โ convert(::Type{Array{T,N}}, ::StaticArrays.SizedArray{S,T,N,M} where M) where {T, S, N} at C:\Users\Administrator.julia\packages\StaticArrays\l7lu2\src\SizedArray.jl:72
โ convert(::Type{T}, ::AbstractArray) where T<:Array at array.jl:554
โ convert(::Type{T}, ::T) where T<:AbstractArray at abstractarray.jl:14
โ ...
โ Stacktrace:
โ [1] convert(::Type{Union{Missing, Array{Tuple{LineNumberNode,Expr},1}}}, ::Tuple{LineNumberNode,Expr}) at .\missing.jl:69
โ [2] setindex!(::IdDict{Type,Union{Missing, Array{Tuple{LineNumberNode,Expr},1}}}, ::Any, ::Any) at .\iddict.jl:74
โ [3] add_signature!(::Revise.CodeTrackingMethodInfo, ::Any, ::LineNumberNode) at C:\Users\Administrator.julia\packages\Revise\BqeJF\src\Revise.jl:501
โ @ Revise C:\Users\Administrator.julia\packages\Revise\BqeJF\src\lowered.jl:106
Revise.LogRecord(Error, evaluation error starting at C:\Users\Administrator.julia\packagesPlots\LWw1t\src\init.jl:89, lowered, Revise_e943ed8b, "C:\Users\Administrator.julia\packages\Revise\BqeJF\src\lowered.jl", 106, (mod=Plots, ex=begin
begin
#= C:\Users\Administrator.julia\packagesPlots\LWw1t\src\init.jl:89 =#
_show(io::IO, mime::MIME"image/png", plt::Plot{<:PDFBackends}) = begin
#= C:\Users\Administrator.julia\packagesPlots\LWw1t\src\init.jl:89 =#
_show_pdfbackends(io, mime, plt)
end
end
__pkguuid__ = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
end)MethodError: Cannotconvertan object of type Tuple{LineNumberNode,Expr} to an object of type Array{Tuple{LineNumberNode,Expr},1}
Closest candidates are:
convert(::Type{Array{T,N}}, ::StaticArrays.SizedArray{S,T,N,M} where M) where {T, S, N} at C:\Users\Administrator.julia\packages\StaticArrays\l7lu2\src\SizedArray.jl:72
convert(::Type{T}, ::AbstractArray) where T<:Array at array.jl:554
convert(::Type{T}, ::T) where T<:AbstractArray at abstractarray.jl:14
...
Stacktrace:
[1] convert(::Type{Union{Missing, Array{Tuple{LineNumberNode,Expr},1}}}, ::Tuple{LineNumberNode,Expr}) at .\missing.jl:69
[2] setindex!(::IdDict{Type,Union{Missing, Array{Tuple{LineNumberNode,Expr},1}}}, ::Any, ::Any) at .\iddict.jl:74
[3] add_signature!(::Revise.CodeTrackingMethodInfo, ::Any, ::LineNumberNode) at C:\Users\Administrator.julia\packages\Revise\BqeJF\src\Revise.jl:501)
Same thing on MacOS with Plots v 1.5.7 and Julia 1.5 (same on Julia 1.4.2).
Easy to downgrade Plots:
] add [email protected]
Plots v1.5.6 works on both Julia 1.4.2 and Julia 1.5.
From below I confirm that mmikhasenko recommendation works, too.
Probably should fix this for everyone's convenience, but two quick work arounds let us get our work done with Plots.
The x264_jll issue should be fixed in https://github.com/JuliaRegistries/General/pull/18881. No need to pin, just ]up. I can't reproduce the PlotThemes error in https://github.com/JuliaPlots/Plots.jl/issues/2886#issuecomment-668032529.
(@v1.5) pkg> up
[1270edf5] โ x264_jll v2020.7.14+0 โ v2019.5.25+2
(@v1.5) pkg> build FFMPEG
julia> using FFMPEG
[ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a]
# success
julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
# success
๐
The x264_jll issue should be fixed in JuliaRegistries/General#18881. No need to pin, just
]up. I can't reproduce the PlotThemes error in #2886 (comment).
This worked for me on Ubuntu on WSL2 with Julia v1.5
(@v1.5) pkg> up [1270edf5] โ x264_jll v2020.7.14+0 โ v2019.5.25+2 (@v1.5) pkg> build FFMPEG julia> using FFMPEG [ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] # success julia> using Plots [ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] # success๐
Did clean install of Julia 1.5 (including deleting .julia).
Did these steps (+ add FFMPEG)
Success
Most helpful comment
๐