This is managed by how you set the LOAD_PATH
variable. See here.
By default LOAD_PATH
is set to:
julia> LOAD_PATH
3-element Array{String,1}:
"@"
"@v#.#"
"@stdlib"
A full search path is checked in the following way:
(@v1.5) pkg> activate .
Activating new environment at `~/Project.toml`
julia> Base.load_path()
3-element Array{String,1}:
"/home/bkamins/Project.toml"
"/home/bkamins/.julia/environments/v1.5/Project.toml"
"/home/bkamins/julia/share/julia/stdlib/v1.5"
(I have activated project in my current working directory)
So you can see that if some package is not found in your project Julia falls back to the next entries of LOAD_PATH
. If you want to avoid it then modify LOAD_PATH
as needed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…