Hi, new to Julia.
I have this package I want to develop which for the sake of example we’ll call myPkg. It’s located in ~/.julia/dev/myPkg and I’ve used PkgTemplates.jl to set up properly.
I’m using Juno through Atom to run my Julia code. When I start up the REPL there I verify that I’m in the correct path:
julia> pwd()
"~/.julia/dev.myPkg"
but when I attempt to load my module from the REPL, I get the following error:
julia> using myPkg
ERROR: ArgumentError: Package myPkg not found in current path:
- Run `import Pkg; Pkg.add("myPkg")` to install the myPkg package.
Now I have found a workaround to this by updating LOAD_PATH:
julia> push!(LOAD_PATH, pwd())
4-element Array{String,1}:
"@"
"@v#.#"
"@stdlib"
"~/.julia/dev/myPkg"
And after doing this I’m able to load myPkg. My question is, why wasn’t this possible for me before when I was already in the correct directory? At face value it’s a minor problem but I have the impression I’m misunderstanding fundamental.
4 posts - 3 participants