Pkg.jl: Store packages in different place than user folder - change DEPOT_PATH

Created on 17 Aug 2018  路  4Comments  路  Source: JuliaLang/Pkg.jl

Dear developers.

Following up on my discussion with @KristofferC in the Julia forum (see here) I want to suggest to make it more clear, how the user can change the DEPOT_PATH or to adjust the hard-coded paths to some other folder than the user folder. Storing basically tens of thousands of files in the user folder makes login/logout in corporate environments extremely slow, if the folder get synchronised with a server.

I am working in a Windows environment with Active Domain Directory syncing the user folder and profiles on every login/logout. When I installed julia 1.0 and added a few larger packages (amongst them Plots, Images, Taro) I was already looking at 40,000 new files in the user folder. Restarting the computer took basically ages, because each login and logout needed 10 minutes.

I wanted to change the package folder then. I found two resources that seemed helpful: The documentation of Pkg and this discussion. The discussion provided code to change the environment variable, but the markdown looks like it was done from the REPL (although the leading pkg>, shell> or julia> is missing). Accordingly, I tried to change the JULIA_DEPOT_PATH variable from the REPL and obviously failed, because it had to be set for the Windows operating system. Re-reading the stackoverflow discussion now, after I got help from the julia forum, I see where I was misinterpreting things. However, I think other users - especially unexperienced - might have the same problem.

I think the easiest/fastest way to make things clearer would be to extend the documentation.

  1. Please include one or two sentences that make it clear, that the environment variables are OS-settings. On Windows they are accessed by Win+R (run) sysdm.cpl --> Advanced tab --> environment variables (button at the bottom of the tab).
  2. Make it clear how to adjust the DEPOT_PATH variable from within the REPL (using empty! and push! commands, for instance) and that this change is not permanent. To make it permanent, it needs to be included in the startup.jl.

Both points might also be an example for the FAQ's.

Two more options came to my mind.

  1. The Windows-installer for julia lets me choose the folder for the installation. Although it is preset to the user folder, I can change it to any folder I have writing permission for. It would be helpful, if the user could chose the DEPOT_PATH during this step as well.
  2. If it is too difficult to include the first step, would it be possible to change the default storage to a path relative to the install folder for julia? Example: I want to install julia to C:\Julia, then - in my eyes - a good position for the package depot would be e.g. C:\Julia\packages. If the packages are installed in the same directory as julia then the user would also notice possible "left-overs" after uninstallation.
documentation

All 4 comments

not impressed --- we've implemented our whole production platform in julia --- but this is so restrictive and complicated.... just not worth it.
We're behind a firewall, so can't add packages.
Previously, we could just copy the package and compile them manually, and set a few paths, and all good...... but v1.0 is just not working.....
Too much work.......
Glen

@MozzyTrd: the new system is not any less capable鈥攐n the contrary, you can do much more with it鈥攊t's just unfamiliar to you. It would be helpful if you can open issues with your specific problems.

@MozzyTrd's issue seems to have been resolved on discourse. As you say, the system was perfectly capable. It just takes time for best practices to become apparent

Glad to hear it all worked out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KristofferC picture KristofferC  路  4Comments

DilumAluthge picture DilumAluthge  路  3Comments

GordStephen picture GordStephen  路  3Comments

moustachio-belvedere picture moustachio-belvedere  路  3Comments

KristofferC picture KristofferC  路  4Comments