Install packages on machine not connected to internet

You can try the following.

First, on the machine which has internet connection, run the following:

$ JULIA_DEPOT_PATH=offline_depot julia
julia> ]
pkg> add StatsBase MultivariateStats # these are just examples, add all the packages you will need here
pkg> <Ctrl-D>

Then copy the offline_depot directory (created by Julia in the previous step) onto the machine you will use in offline mode. Then start Julia like this:

$ JULIA_DEPOT_PATH=<path-to-your>/offline_depot JULIA_PKG_OFFLINE=true julia
julia> using MultivariateStats # use the preinstalled packages here

Hope that helps.

3 Likes