Where or How to edit DEPOT_PATH

I know this is quite an old conversation, but I have recently been struggling with the same issue of DEPOT_PATH and how to set it in Windows. I have found a way that does not require permanent changes to the global environment variables. The syntax is a bit hairy with a few challenges so I thought it may save somebody else some time if I post my recipe here. I found experimentally that it is useless to set DEPOT_PATH from within the REPL. The package system keeps on using the original path. Your only option is setting the JULIA_DEPOT_PATH environment variable as indicated in previous posts. If you have a scenario where you do not want this change to be permanent, for example, you want to have a specific shortcut on your desktop that launches Julia from a different binary source and using a different DEPOT_PATH, here is how to do it:

  • Find the julia.exe file you want to launch and create a shortcut to it in your desktop or wherever you want it.

  • Open the properties of the shortcut and replace the Target command with the following:

C:\Windows\System32\cmd.exe /c “SET JULIA_DEPOT_PATH=yourdepotpath&&START /D yourjuliabinpath julia.exe”

  • Change the icon of the shortcut to something more appropriate than a black square.

You can add additional parameters before the final quote for example -i -q. Note that yourdepotpath will be interpreted by both cmd.exe and Julia and should be escaped accordingly. This can get tricky so keep the path simple. The yourjuliabinpath is interpreted by cmd.exe only so that is much easier. For cmd escaping, use the ^-character.

This post is getting too long so I will end with the word relocatable.