Is there a simple Julia upgrade command?

Hi, can we update Julia just inside Julia by running a command like update, rather than download a new version from website? :smiley:

2 Likes

AFAIK not, but you can use a script like

https://github.com/abelsiqueira/jill

3 Likes

Thanks you, that seems to be a workaround.

I will try it next time, since I just update both my mac and linux version manually :grinning:

I just installed 1.5.1 using GitHub - johnnychen94/jill.py: A cross-platform installer for the Julia programming language which is a python fork of the same script, with apparently some extra features. It was really easy, I just called

$ jill install

and it installed the latest version, and even found all my previously installed packages, though I hadnā€™t used Jill before.

As a relatively (well, very) new linux user, I am slightly confused about all the different install folder conventions going around. I never know if I should install in /usr/local/bin or /opt/ or whatever else (I donā€™t remember all the different ones Iā€™ve seen). I installed Anaconda (python) earlier today, which put everything in ~/Anaconda3/ :confused:

Jill by default installs to ~/packages/julias/ with symlinks in ~/.local/bin which was a totally new place for me. I wonder if there is some conventional wisdom on this. For now, my various different pieces of software are scattered all over the place.

If your machine is single-user, this is the best place. There is simply no need for anything that would require sudo or root access.

4 Likes

Yes, it is. Thanks, Iā€™ll keep that in mind.

My config stuff is in ~/.julia, but now I wonder if it should be in ~/.local/.julia ehh. or somewhere like that.

My usual puff for those using Windows - consider using the Chocolatey package manager.
Julia 1.5.1 is available - just run choco update julia

3 Likes

Congratulations on the progress, and on master:

$ ~/julia-1.4.0/bin/julia -q
julia> @time using Plots
 13.396186 seconds (13.81 M allocations: 773.200 MiB, 2.56% gc time)

vs. 1.5.1
  9.904794 seconds (11.06 M allocations: 640.073 MiB, 3.11% gc time)

vs. 1.6 master:
  5.579115 seconds (7.95 M allocations: 556.413 MiB, 5.02% gc time)

E.g. Gtk.jl has similar numbers, lower on master, higher on 1.4.0.

3 Likes

No, ~/.julia is fine. A lot of software makes hidden folders in the home directory like that. Ultimately, itā€™s up to you - I think these conventions are pretty lose, but my preference lately has been to have all of my user scripts (the things I write) symlinked in ~/bin, and executables from software I install symlinked in ~/.local/bin.

But config files and stuff I just put wherever the default is, because I canā€™t be bothered to change (and then remember) the paths to those things

6 Likes

Will I need to copy the environment (Project.toml, Manifest.toml) for upgrading from 1.5 to 1.5.1? And rebuild and recompile everything?

PS: If youā€™re on macOS, upgrading Julia itself is easy if you use Homebrew: brew cask upgrade julia

I also wish Julia used versioned binary names, ala julia-1.5, and symlinked the selected one into the bin directory. That way we could easily revert to our old versions if something broke on an upgrade. (I think asdf can do this, but asdf is buggy and slow.)

Update: Just checked out jill.py; Seems like it has my desired features!

1 Like

Home directory layout are not strongly standardized. ~/.local comes from the spec in

https://www.freedesktop.org/software/systemd/man/file-hierarchy.html

Once you have a ~/.julia directory, you might as well have all the relevant stuff in it.

That said, one relevant consideration is backup exclusions, a lot of exclusion lists for backup tools ignore ~/.cache automatically, and one has to do the same for subdirectories in ~/.julia to avoid backing up gigabytes of files that can be downloaded/regenerated anytime.

This is so true. Almost painful to mention that upgrading Julia on Windows is easier than on Pop! OS.

A minor remark: ā€˜updateā€™ is depreciated, itā€™s ā€˜upgradeā€™ now. Normally I do:

choco outdated         # show outdated apps
choco upgrade all -y   # upgrades everything
#choco upgrade julia   # (I seldom upgrade specific apps)

Imho itā€™s really well worth ā€œwastingā€ the time to setup Chocolatey.

Honest question - what benefits do Chocolatey bring when updating Julia on Windows? I just run the new installer (and for x.1 releases copy over the package environment) and everything works just as usual. Are other people having serious upgrade headaches?

What youā€™re discribing here is actually a real inconvenience. Every time I forget how to handle environments/packages.On Linux/thereā€™s also updating symlinks, not sure what you do on windows. But on linux/Macos itā€™s 5-10 minutes each time, enough that I often postpone updating for weeks.

Jill may have solved this for me. Although, when I used Jill to install a nightly build, it didnā€™t find my packages/environments :confused:

I think the answer to that question must be yes. I have used Julia on Windows for several years. Quite often I see people on here getting tied in knots with windows 10 installs, including newbies who are driven to tears of frustration.
Since using Chocolatey I have had a much better experience.

Th emost recent example was a thread on IJulia not installing properly. I admit in that case the person did not have Admin rights so Choco was not the answer.

I always use the standard Windows installer, and Iā€™ve never had any problems.

1 Like

Speaking of newbies to Julia having frustrations. I guess I am in that camp.

Background info:

  • I am on Windows 10 (64-bit)
  • Julia binary is in: ā€œC:\Users\myusrname\AppData\Local\Programs\Julia 1.5.1\bin\julia.exeā€
  • Packages are in: ā€œC:\Users\myusrname.juliaā€

I just finished upgrading to 1.5.1 and I would like to NOT have to re-install all the packages that I downloaded for the previous version. Is there an easy way to tell Julia 1.5.1 where my packages are at? Or will I have re-install each package I was previously using?

Since I am a relative newbie, if you can please explain it to me very basically. Thank you for your help.

If you donā€™t mind the wait, just reinstall from scratch. I delete the .julia folder regularly.
All it takes is around five minutes to get it back through a reinstallation.

2 Likes

If you upgraded from Julia 1.5.0 you shouldnā€™t have to do anything. If you upgraded from Julia 1.4.X you can copy .julia/environments/v1.4 to .julia/environments/v1.5 (just two text files).

8 Likes

Oh wow. This is not a great recommendation for newbies :sweat_smile: I donā€™t think it should ever be necessary to delete .julia. At most, you might want to delete .julia/registries/General. Deleting .julia makes for a not-so-great user experience and Iā€™ve seen it recommended a couple of times now.

:+1:

5 Likes