LoadError during Pluto precompile in Anaconda

Hi everyone!

I just started on a project and the team is using Julia while I primarily use Python (and MATLAB before that). I use Anaconda to manage Python/Jupyter, etc.

I installed Julia through conda-forge into a new conda environment and it runs fine.

Then I tried to add the Pluto package but both Pluto and HTTP failed to precompile.

I have looked in the directories and cert.pem does not exist. Is that the whole problem here?

I use Anaconda because I’m not very good at managing packages/versions/dependencies/etc. Just a nerd trying to model sensor responses.

Thanks for any help!

==============
Output with errors:

(@julia) pkg> 
precompile

Precompiling project…
✗ HTTP
✗ Pluto
0 dependencies successfully precompiled in 6 seconds. 37 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]

Failed to precompile Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781] to /home/adam/anaconda3/envs/julia/share/julia/compiled/v1.8/Pluto/jl_EGf1eA.
ERROR: LoadError: InitError: SystemError: opening file "/home/adam/anaconda3/envs/julia/share/julia/cert.pem": No such file or directory
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:176
[2] #systemerror#80
@ ./error.jl:175 [inlined]
[3] systemerror
@ ./error.jl:175 [inlined]
[4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
@ Base ./iostream.jl:293
[5] open
@ ./iostream.jl:275 [inlined]
[6] open(f::Base.var"#387#388"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:382
[7] open
@ ./io.jl:381 [inlined]
[8] read
@ ./io.jl:462 [inlined]
[9] sslinit()
@ MbedTLS ~/anaconda3/envs/julia/share/julia/packages/MbedTLS/lqmet/src/ssl.jl:787
[10] init()
@ MbedTLS ~/anaconda3/envs/julia/share/julia/packages/MbedTLS/lqmet/src/MbedTLS.jl:55
[11] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
@ Base ./loading.jl:831
[12] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
@ Base ./loading.jl:1039
[13] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1315
[14] _require_prelocked(uuidkey::Base.PkgId)
@ Base ./loading.jl:1200
[15] macro expansion
@ ./loading.jl:1180 [inlined]
[16] macro expansion
@ ./lock.jl:223 [inlined]
[17] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
[18] include
@ ./Base.jl:419 [inlined]
[19] 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:1554
[20] top-level scope
@ stdin:1
during initialization of module MbedTLS
in expression starting at /home/adam/anaconda3/envs/julia/share/julia/packages/HTTP/z8l0i/src/HTTP.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile HTTP [cd3eb016-35fb-5094-929b-558a96fad6f3] to /home/adam/anaconda3/envs/julia/share/julia/compiled/v1.8/HTTP/jl_RHiErh.
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:1707
[3] compilecache
@ ./loading.jl:1651 [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] include(mod::Module, _path::String)
@ Base ./Base.jl:419
[10] include(x::String)
@ Pluto ~/anaconda3/envs/julia/share/julia/packages/Pluto/ZBojR/src/Pluto.jl:11
[11] top-level scope
@ ~/anaconda3/envs/julia/share/julia/packages/Pluto/ZBojR/src/Pluto.jl:63
[12] include
@ ./Base.jl:419 [inlined]
[13] 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
[14] top-level scope
@ stdin:1
in expression starting at /home/adam/anaconda3/envs/julia/share/julia/packages/Pluto/ZBojR/src/notebook/Events.jl:1
in expression starting at /home/adam/anaconda3/envs/julia/share/julia/packages/Pluto/ZBojR/src/Pluto.jl:1
in expression starting at stdin:1

I don’t think that many people in this forum use Julia installed via anaconda. Is there a specific reason why you want to use this installation variant instead of installing Julia directly?

Julia has its own package manager which works well.

Which operating system are you using?

Hints on installing Julia: KiteSimulators.jl/Installation.md at main · aenarete/KiteSimulators.jl · GitHub

Also worth reading: Working with Julia projects | Julia programming notes

1 Like

Thank you! I will be using both Pop! OS (Ubuntu) and Windows on different computers.

I just use Anaconda because a few years back I had some issues installing a new version of Python on Ubuntu and I’ve also had package issues when not using virtual environments. Anaconda just took care of all of that and makes everything work the same when I switch between Linux and Windows.

I did some reading on the project environments in Julia so that part seems to be taken care of. I guess I’ll just take the leap and install it the old fashioned way.

I appreciate the links!

The easiest way to manage Julia installations right now is probably juliaup:

This allows you to install any Julia version you want from the command line, update your version as required, and also puts julia on your path automatically.

Julia comes with a lot of patched dependencies so installing it from places other than the Julia website (which is what juliaup does) often leads to problems.

1 Like