I know, but thanks for saying it anyway!
My current (unsafe) solution is to add this to my startup.jl
# https://discourse.julialang.org/t/10-15-minute-ttfp-with-plots-jl-please-help/92636/53?u=lilith
if isinteractive()
import Pkg;
function _add(pkg::AbstractString)
Pkg.activate(pkg, shared=true); Pkg.add(pkg)
open(joinpath(first(DEPOT_PATH), "config", "startup.jl"), "a") do io
println(io, "\nisinteractive() && push!(LOAD_PATH, \"@$pkg\")")
end
end
function _up(pkg::AbstractString)
Pkg.activate(pkg, shared=true); Pkg.up()
end
end
and run
_add("Plots")
once from any REPL. The isinteractive()
branch is optional and only works in Julia 1.8+.
This is a combination of my idea to use a designated Plots
environment and ignore select compat entries and @nilshg’s idea to use load paths