I have a Project+Manifest file and I would like to add packages as specified by the Manifest file into into another environment (say the global one). Is this possible?
Yes, put them all in the LOAD_PATH
. The earlier ones take precedence but they are effectively merged.
1 Like
In concrete terms, I believe Stefan’s answer means
push!(LOAD_PATH, "path/to/your/Project.toml")
In Julia 1.4, the default value of LOAD_PATH
is
julia> LOAD_PATH
3-element Array{String,1}:
"@"
"@v#.#"
"@stdlib"
which expands to
julia> Base.load_path()
2-element Array{String,1}:
"/home/ettersi/.julia/environments/v1.4/Project.toml"
"/opt/julia/julia-1.4.2/share/julia/stdlib/v1.4"
in the default environment, and
julia> Base.load_path()
3-element Array{String,1}:
"/path/to/package/Project.toml"
"/home/ettersi/.julia/environments/v1.4/Project.toml"
"/opt/julia/julia-1.4.2/share/julia/stdlib/v1.4"
if you activated a package environment.
Note that this in particular means that the packages in your default environment are available even when you activate a package environment.
1 Like