Hello, How to correctly configure Julia standalone,
For everything to happen from the external storage USB drives: Add, update packages !!!?
In the site VSC portable, you can read how to configure VSC (Visual Studio Code) so that it works in such mode.
Is there something similar for Julia?
I have not tried myself, but I’d say that all you need is to set the JULIA_DEPOT_PATH environment variable to somewhere in the USB drive where you have Julia installed, before starting Julia.
If you want to use your portable installation of VSC with the Julia extension, you should also configure the extension to run Julia from the USB drive.
Please show me how to do it !!
How to set the JULIA_DEPOT_PATH?
Julia currently runs Portable Mode or Standalone from a folder on the PC,
“C: \ Users \ hermesr \ Documents \ Julia software”
It depends on the operating system. It looks like you are using Windows, so you could make a julia.bat
file with the commands:
set JULIA_DEPOT_PATH = path\to\somewhere\in\the\usb\drive
start \path\to\julia\executable
If you’re on Windows, have a look at my post - Guide: How to Create a Portable Julia Pro Installation for Windows.
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:
How should I proceed?
the bat file is the one recommended above:
set PATH=F:\SA_Ptbls:\Julia1.5.0\bin;%PATH%
set JULIA_DEPOT_PATH=F:\SA_Ptbls\julia-1.5.0-win64
The final batch file is as follows, thanks to the answer of Przemyslaw Szufel and the link:
@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
When executing the batch file, we obtain:
the batch file can be run from a shortcut, after being configured as shown: