Hi all,

I've been playing around with trying to install Julia and some basic 
packages system-wide to run a workshop for our department in a couple of 
weeks time. Mostly it's working well, and I'm really excited about seeing 
what people think!

I ran into the problem that Pkg.dir("PackageName"), although documented as 
returning the path to a package, doesn't necessarily do this in the right 
way. In particular, if a user has set up their own .julia directory, doing 
Pkg.dir("ASharedPackage") returns ~/.julia/v0.x/ASharedPackage even if that 
folder doesn't exist. 

That is, if JULIA_PKGDIR is not the same as the directory the package is 
*actually* in, Pkg.dir("Package") won't give the right location.

I hit this problem trying to get IJulia installed for everyone to use, 
becase one of its dependencies Nettle uses Pkg.dir("Nettle") to find itself 
when loaded, and so if installed system-wide (in <julia>/local/share) it 
won't work.

So, is there a more reliable way to get the path to a package? 

[Pkg.dir might need to be smarter instead, but that's more a development 
question. I commented on that here 
<https://github.com/JuliaLang/julia/issues/8679>]

Cheers,
Scott

Reply via email to