Pkg.jl
Pkg.jl copied to clipboard
[ENHANCEMENT] Installation of julia packages for fully offline environments
It could be nice to have a simple way of installing a package for fully offline environments. Python has wheels archives and it's ok but you often have to manually download several archives, libraries should be shipped with all their depandancies.
Besides, because the need of offline installation arise usually in constrained environments, the installation directory of these packages should be configurable and default on the directory of the portable version of julia used.
Have you seen Pkg.offline(true)
?
I have found the functionnality you are talking about in the code But not in the documentation.
Anyway, setting Pkg.offline(true)
doesn't solve everything it seems.
I'm on windows with julia 1.6.3
so to solve the problem of having the .julia
in the root directory of my user (I have no rights in this dir), I used JULIA_DEPOT_PATH before starting julia's CLI.
The problem is that I don't know of this will behave when using julia with vscode but I guess this is not urgent right now.
The second problem is to be able to install a package such as Julia DataFrames from sources.
So I downloaded the sources as a zip archive but I see no simple way of installing the package from theses sources.
Could it be possible to install this package with add
? Right now I have
(v1.6) pkg> add C:\Users\libs\julia\DataFrames.jl-main
ERROR: Did not find a git repository at `C:\Users\libs\julia\DataFrames.jl-main`
Could it be possible to install this package with add ? Right now I have
Use dev
.
Thanks for your help.
I did succeed in installing all the required packages to use DataFrames by manually dowloading them from git.
I also had to manually install the registry in my julia dir.
I did not use the Pkg.offline
command.
If I may give some feedback, it could be nice to have a list of all missing dependancies of a package and the required version. Right now the dev
command only gives one of the missing package and not all the missing tree.
Il could also be useful to pass a directory to the dev
command containing several git archives of julia packages and julia would install as many packages as possible from this directory.
Finally, regarding JULIA_DEPOT_PATH, I believe this can be set in the setting.json
of vscode using the external terminal path parameter so it's not a real problem.
Feel free to close this issue and thanks again for your help.
Thanks for your help. I did succeed in installing all the required packages to use DataFrames by manually dowloading them from git. I also had to manually install the registry in my julia dir. I did not use the
Pkg.offline
command.If I may give some feedback, it could be nice to have a list of all missing dependancies of a package and the required version. Right now the
dev
command only gives one of the missing package and not all the missing tree.Il could also be useful to pass a directory to the
dev
command containing several git archives of julia packages and julia would install as many packages as possible from this directory.Finally, regarding JULIA_DEPOT_PATH, I believe this can be set in the
setting.json
of vscode using the external terminal path parameter so it's not a real problem.Feel free to close this issue and thanks again for your help.
Hi do you solve this problem? I am also trying to install some packages offline. However, it seems even with local git clone, Pkg still need network to finish installing process, otherwise it throws errors.
The total size of all .jl files in the 1000 most commonly downloaded packages is about 172MB, so predownloading and doing offline package mangagement seems like quite a reasonable option.