Best way to update Julia

Hi,

I want to know what’s the best way to update Julia? I used this as a reference and I realized that the path to Julia is not present in PATH environment variable. So I’ll probably need to uninstall Julia and install the new version.

So please let me know what should I do to update Julia to 1.5. I have 1.4 currently and I use Ubuntu 20

Download and extract julia to some path, e.g.,

/home/user/programs/julia/julia-1.5.0

open your environment file, e.g., with

sudo gedit /etc/environment

add your path (or edit the old path if it already exists)

/home/user/programs/julia/julia-1.5.0/bin

log off, and on again. Then typing julia in the terminal should start REPL.

So will this link the new Julia with the packages installed from old julia? Because I don’t want to install CUDA all over again and consume double the memory.

No, the packages are not withdrawn to your new environment. But I think if you add them in v1.5, and the same package versions already exists from julia 1.4 they won’t be installed twice, because all packages are stored in the hidden common folder ~./julia. Alternatively you can try to copy the Project.toml and Manifest.toml files from the hidden folder

~./julia/environments/v1.4

to the one of v.1.5 therein. This should withdraw all installed packages from your old version. However, I never tried that.

And what if I install julia through these managers like Jill or asdf? Because what happened was that I installed Julia 1.5 and when I ran CUDA on it, it started installed CUDA 11.1. That’s why I was asking.

I simply do not know, because I’ve never used that. However, from the jill documentation :

if you wish to upgrade Julia and copy over the old environment to the new one, run the following:

bash jill.sh -u x.y.z

Where x.y.z is your current version.

1 Like