How to properly configure Julia portable or standalone

Viewed 919

How to correctly configure Julia portable or stanalone, For everything to happen from the external storage USB drives: Add, update packages ? In Julia's helps is there any procedure?

This is what happens to me after running the .bat file. From the USB flash I still have reference to the installation of Julia in C: after running the .bat file.

2 Answers

All you need to do is to configure your JULIA_DEPOT_PATH. This is the place where Julia is installing it's packages and holding pre-compiled codes.

Assume your installation (USB drive) is D:\ and you unzip Julia to D:\Julia1.5.0

mkdir D:\JuliaPkg1.5.0
set PATH=D:\Julia1.5.0\bin;%PATH%
set JULIA_DEPOT_PATH=D:\JuliaPkg1.5.0
julia

Now you are ready to install the packages etc.

Thanks to the answer of Przemyslaw Szufel and the link

The final solution is the following: File batch windows

@echo off
set myDIR=%~d2\SA_Ptbls\julia-1.5.0-win64
if not exist %myDIR% (mkdir %myDIR%)
set PATH=%~d2\SA_Ptbls\julia-1.5.0-win64\julia-1.5.0\bin;%PATH%
set JULIA_DEPOT_PATH=%~d2\SA_Ptbls\julia-1.5.0-win64
julia
  1. % ~ d2 gives you the current drive letter when connect the USB drive to another computer (the drive letters change!!!)
  2. if not exist% myDIR% (mkdir% myDIR%) checks if the subdirectory exists, if it does not exist it creates it

When executing the batch file, we successfully obtain: Julia_PortableOk

And to run the batch file from a shortcut. After creating the shortcut it was configured as shown: ShortcutJuliaOk

I did not achieve that in the status bar when executing the batch file the Julia icon was shown; and instead shows the WindowsPowerShell icon: statusbarJuliaPortable

Related