Juliaup really is magic

Yes. Eg I have something like

# install packages if not present
let deps = Set(map(x -> x.name, values(Pkg.dependencies())))
    for name in ["Revise", "EmacsVterm"] # customize here
        if name ∉ deps
            @info "installing package" name
            try
                Pkg.add(name)
            catch
                @warn "could not install package" name
            end
        end
    end
end

but it relies on experimental/unexported API, so maybe there is a better solution.

That can also install into a non-global environment, which I why I use ensureglobalpkg from Setup.jl/src/pkgutils.jl at master - tec/Setup.jl - Code by TEC

2 Likes