[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-17 Thread Jan Hlavacek
On Wednesday, August 17, 2016 at 12:37:58 AM UTC-4, Andreas Lobinger wrote:
>
>
> http://docs.julialang.org/en/release-0.4/stdlib/pkg/#Base.Pkg.dir 
>
> For improving the documentation it would be interesting, what information 
> you (or your admin, the 'they') had used for the setup.
>

One thing that is not clear to me is: what happens when I have several 
package directories:  a readonly global one where only root can install new 
packages, and a local user one where the user can install.  Which one 
should Pkg.dir() return?  How will Julia know about the other one? 

I know now about Base.LOAD_PATH and Base.LOAD_CACHE_PATH, and know that 
each of them can have  multiple paths in them.  Their contents does not 
seem to have any effect at all on Pkg.dir(), though.

Is it possible to have some packages in a system wide global directory, say 
/usr/local/share/julia/site/... and some user installed packages in a user 
directory, say ~/.julia/...?  How would such setup be achieved?


[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-17 Thread Jan Hlavacek

On Wednesday, August 17, 2016 at 12:37:58 AM UTC-4, Andreas Lobinger wrote:
>
>
> http://docs.julialang.org/en/release-0.4/stdlib/pkg/#Base.Pkg.dir 
>
> For improving the documentation it would be interesting, what information 
> you (or your admin, the 'they') had used for the setup.
>
>
The documentation seems good, it seems that the problem was caused by 
missing JULIA_PKGDIR environment variable.  Thanks for your help! 


[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-16 Thread Andreas Lobinger
Hello colleague,

On Wednesday, August 17, 2016 at 5:10:49 AM UTC+2, Jan Hlavacek wrote:

> On Tuesday, August 16, 2016 at 3:26:44 PM UTC-4, Andreas Lobinger wrote:
>>
>>
>> Looks like the local julia installation has identified a missing package 
>> repository and then tried to get METADATA into that. The place where julia 
>> expects a package repository can be configured. In your case the setup was 
>> incorrect.
>>
>  

> Thank you.  Would you be able to provide some pointers to documents that 
>> describe what the correct setup should be?  When I was trying to find that 
>> information on the web I got what seemed to me like conflicting pieces of 
>> information.
>>
>
http://docs.julialang.org/en/release-0.4/stdlib/pkg/#Base.Pkg.dir 

For improving the documentation it would be interesting, what information 
you (or your admin, the 'they') had used for the setup.




[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-16 Thread Jan Hlavacek


On Tuesday, August 16, 2016 at 3:26:44 PM UTC-4, Andreas Lobinger wrote:
>
> Hello colleague,
>
> Looks like the local julia installation has identified a missing package 
> repository and then tried to get METADATA into that. The place where julia 
> expects a package repository can be configured. In your case the setup was 
> incorrect.
>
>
Thank you.  Would you be able to provide some pointers to documents that 
describe what the correct setup should be?  When I was trying to find that 
information on the web I got what seemed to me like conflicting pieces of 
information.


[julia-users] Re: Does Julia always need internet access when loading a package?

2016-08-16 Thread Andreas Lobinger
Hello colleague,

On Tuesday, August 16, 2016 at 5:41:47 PM UTC+2, Jan Hlavacek wrote:
>
> They have recently installed a whole bunch of packages system wide, so 
> that they are available in all projects without having to install them 
> locally.  However, when I try to use a package from one of their free 
> projects, there is a problem. Free projects by default do not have internet 
> access.  When loading a Julia package, for example 
>
> using Gadfly
>
> the package will be recompiled, and then Julia tries to go to github and 
> download METADATA.jl,  which takes for ever before it times out.  Then, 
> probably because of the missing metadata, some other errors are reported.  
> Finally, the package gets loaded and can be used.  The messages are as 
> follows:
>
> INFO: Precompiling module Gadfly...
> INFO: Initializing package repository 
> /projects/41eb44d2-462c-4af8-80a5-ac0c9cad99dd/.julia/v0.4
> INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
> fatal: unable to connect to github.com:
> github.com[0: 192.30.253.112]: errno=Connection timed out
> ...
>
> Does Julia really need internet access just to load a package?  Is there 
> any way to work around it?
>
 
No. And yes.
Looks like the local julia installation has identified a missing package 
repository and then tried to get METADATA into that. The place where julia 
expects a package repository can be configured. In your case the setup was 
incorrect.