Using IJulia throws error

Hi,
I am new to the julia paradigm and have been trying to run the tutorials in the JuliaCon2021. I use their project.toml and instantiate my project. I get some errors with most .jll files which I am not sure how to fix. I then try to run IJulia and receive the following error. I am running julia 1.6.2 (the tutorial did say it was tested on julia 1.6.0)

julia> using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: ArgumentError: Package MbedTLS_jll does not have JLLWrappers in its dependencies:

  • If you have MbedTLS_jll checked out for development and have
    added JLLWrappers as a dependency but haven’t updated your primary
    environment’s manifest file, try Pkg.resolve().
  • Otherwise you may need to report an issue with MbedTLS_jll
    Stacktrace:
    [1] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:906
    [2] include
    @ .\Base.jl:386 [inlined]
    [3] 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::String)
    @ Base .\loading.jl:1235
    [4] top-level scope
    @ none:1
    [5] eval
    @ .\boot.jl:360 [inlined]
    [6] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
    [7] top-level scope
    @ none:1
    in expression starting at C:\Users\Valli.julia\packages\MbedTLS_jll\qMb7d\src\MbedTLS_jll.jl:2
    ERROR: LoadError: Failed to precompile MbedTLS_jll [c8ffd9c3-330d-5841-b78e-0817d7145fa1] to C:\Users\Valli.julia\compiled\v1.6\MbedTLS_jll\jl_9271.tmp.
    Stacktrace:
    [1] error(s::String)
    @ Base .\error.jl:33
    [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1385
    [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1329
    [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1043
    [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:936
    [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:923
    [7] include
    @ .\Base.jl:386 [inlined]
    [8] 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::String)
    @ Base .\loading.jl:1235
    [9] top-level scope
    @ none:1
    [10] eval
    @ .\boot.jl:360 [inlined]
    [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
    [12] top-level scope
    @ none:1
    in expression starting at C:\Users\Valli.julia\packages\MbedTLS\4YY6E\src\MbedTLS.jl:1
    ERROR: LoadError: LoadError: Failed to precompile MbedTLS [739be429-bea8-5141-9913-cc70e7f3736d] to C:\Users\Valli.julia\compiled\v1.6\MbedTLS\jl_90FA.tmp.
    Stacktrace:
    [1] error(s::String)
    @ Base .\error.jl:33
    [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1385
    [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1329
    [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1043
    [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:936
    [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:923
    [7] include(mod::Module, _path::String)
    @ Base .\Base.jl:386
    [8] include(x::String)
    @ IJulia C:\Users\Valli.julia\packages\IJulia\e8kqU\src\IJulia.jl:33
    [9] top-level scope
    @ C:\Users\Valli.julia\packages\IJulia\e8kqU\src\IJulia.jl:309
    [10] include
    @ .\Base.jl:386 [inlined]
    [11] 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:1235
    [12] top-level scope
    @ none:1
    [13] eval
    @ .\boot.jl:360 [inlined]
    [14] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
    [15] top-level scope
    @ none:1
    in expression starting at C:\Users\Valli.julia\packages\IJulia\e8kqU\src\hmac.jl:1
    in expression starting at C:\Users\Valli.julia\packages\IJulia\e8kqU\src\IJulia.jl:1
    ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to C:\Users\Valli.julia\compiled\v1.6\IJulia\jl_8D51.tmp.
    Stacktrace:
    [1] error(s::String)
    @ Base .\error.jl:33
    [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1385
    [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1329
    [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1043
    [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:936
    [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:923

Hope someone can help me with this.

Did you try to run Pkg.resolve() as suggested in the error log?

Hi Arrigo,
Thank you for your suggestion.
I tried Pkg.resolve() but received no changes:

julia> Pkg.resolve()
No Changes to D:\DataScience\Julia\JuliaCon2021\JuliaCon2021-StatisticsWithJuliaFromTheGroundUp\Project.toml
No Changes to D:\DataScience\Julia\JuliaCon2021\JuliaCon2021-StatisticsWithJuliaFromTheGroundUp\Manifest.toml

When I try Pkg.precompile(), it throws following errors:
julia> Pkg.precompile()
Precompiling project…
✗ MbedTLS_jll
✗ Zlib_jll
✗ CompilerSupportLibraries_jll
✗ ZipFile
✗ CodecZlib
✗ libpng_jll
✗ Libtiff_jll
✗ Blosc_jll
✗ HDF5_jll
✗ LibSSH2_jll
✗ XML2_jll
✗ OpenBLAS_jll
✗ OpenSpecFun_jll
✗ DataDeps
✗ RData
✗ Blosc
✗ XSLT_jll
✗ Gettext_jll
✗ DSP
✗ ForwardDiff
✗ ColorVectorSpace
✗ CUDA
✗ HypothesisTests
✗ HDF5
✗ Glib_jll
✗ RDatasets
✗ Zygote
✗ Lasso
✗ NNlibCUDA
✗ ImageMorphology
✗ ImageTransformations
✗ ImageMetadata
✗ ImageFiltering
✗ MAT
✗ Qt5Base_jll
✗ ImageDistances
✗ Flux
✗ ImageContrastAdjustment
✗ MLDatasets
✗ Plots
✗ ImageQualityIndexes
✗ Images
✗ Metalhead
0 dependencies successfully precompiled in 79 seconds (214 already precompiled)

I have julia 1.5.4 as well as julia 1.6.2. Will that cause an issue?

Thank you

Having different Julia versions installed is not a problem. You just need to reinstall all the Julia packages that you need in each version (they don’t carry over). By the way, I don’t see any error messages in the last log.

Hi Arrigo,
Thank you for helping me with this issue.

I tried following your advise and added all the missing dependencies to my current project. Here is the Pkg.status() result:
julia> Pkg.status()
Status D:\DataScience\Julia\JuliaCon2021\JuliaCon2021-StatisticsWithJuliaFromTheGroundUp\Project.toml
[a74b3585] Blosc v0.7.0
[336ed68f] CSV v0.8.5
[052768ef] CUDA v3.3.4
[aaaa29a8] Clustering v0.14.2
[944b1d66] CodecZlib v0.7.0
[c3611d14] ColorVectorSpace v0.8.7
[861a8166] Combinatorics v1.0.2
[717857b8] DSP v0.7.2
[124859b0] DataDeps v0.7.7
[a93c6f00] DataFrames v1.2.1
[31c24e10] Distributions v0.25.11
[587475ba] Flux v0.12.5
[f6369f11] ForwardDiff v0.10.18
[38e38edf] GLM v1.5.1
[f67ccb44] HDF5 v0.15.5
[09f84164] HypothesisTests v0.10.4
[7073ff75] IJulia v1.23.2
[f332f351] ImageContrastAdjustment v0.3.7
[51556ac3] ImageDistances v0.2.13
[6a3955dd] ImageFiltering v0.6.21
[bc367c6b] ImageMetadata v0.9.5
[787d08f9] ImageMorphology v0.2.11
[2996bd0c] ImageQualityIndexes v0.2.2
[02fcd773] ImageTransformations v0.8.12
[916415d5] Images v0.23.3
[5ab0869b] KernelDensity v0.6.3
[b964fa9f] LaTeXStrings v1.2.1
[b4fcebef] Lasso v0.6.2
[23992714] MAT v0.10.1
[eb30cadb] MLDatasets v0.5.7
[442fdcdd] Measures v0.3.1
[dbeba491] Metalhead v0.5.3
[6f286f6a] MultivariateStats v0.8.0
[a00861dc] NNlibCUDA v0.1.7
[91a5bcdd] Plots v1.19.3
[df47a6cb] RData v0.8.3
[ce6b1742] RDatasets v0.7.5
[f2b01f46] Roots v1.0.11
[276daf66] SpecialFunctions v1.5.1
[2913bbd2] StatsBase v0.33.8
[f3b207a7] StatsPlots v0.14.25
[a5390f91] ZipFile v0.9.3
[e88e6eb3] Zygote v0.6.17
[0b7ba130] Blosc_jll v1.21.0+0
[78b55507] Gettext_jll v0.21.0+0
[7746bdde] Glib_jll v2.68.1+0
[0234f1f7] HDF5_jll v1.12.0+1
[89763e89] Libtiff_jll v4.3.0+0
[efe28fd5] OpenSpecFun_jll v0.5.5+0
[ea2cea3b] Qt5Base_jll v5.15.3+0
[02c8fc9c] XML2_jll v2.9.12+0
[aed1982a] XSLT_jll v1.1.34+0
[b53b4c65] libpng_jll v1.6.38+0
[e66e0078] CompilerSupportLibraries_jll
[29816b5a] LibSSH2_jll
[c8ffd9c3] MbedTLS_jll
[4536629a] OpenBLAS_jll
[83775a58] Zlib_jll

I still can’t seem to get some of the libraries working. For instance using IJulia throws following error:
julia> using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: ArgumentError: Package MbedTLS_jll does not have JLLWrappers in its dependencies:

  • If you have MbedTLS_jll checked out for development and have
    added JLLWrappers as a dependency but haven’t updated your primary
    environment’s manifest file, try Pkg.resolve().
  • Otherwise you may need to report an issue with MbedTLS_jll
    Stacktrace:
    [1] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:906
    [2] include
    @ .\Base.jl:386 [inlined]
    [3] 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::String)
    @ Base .\loading.jl:1235
    [4] top-level scope
    @ none:1
    [5] eval
    @ .\boot.jl:360 [inlined]
    [6] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
    [7] top-level scope
    @ none:1
    in expression starting at C:\Users\Valli.julia\packages\MbedTLS_jll\qMb7d\src\MbedTLS_jll.jl:2

What does the MbedTLS_jll does not have JLLWrappers in its dependencies mean? I tried precompile and resolve, nothing seems to work!

Thanks again