Upgrading Julia

Upgrading Julia

How to upgrade Julia to the latest stable release effortlessly

·

3 min read

What Is Julia?

Julia is a high-level, dynamic programming language designed to give users the speed of C/C++ while remaining as easy to use as Python. This means that developers can solve problems faster and more effectively. It is a programming language designed mainly for scientific computing.

Release Notes

Julia version 1.7.2, the second patch release in the 1.7 series of releases, is now available. You can get binaries for glibc Linux (i686, x86-64, ARMv7, AArch64), musl Linux (x86-64), FreeBSD (x86-64), macOS (x86-64, AArch64), and Windows (32-, 64-bit) at julialang.org/downloads. As a patch release, 1.7.2 contains no new features or breaking changes, only bug fixes, documentation improvements, and performance improvements. The Julia team recommends that anyone currently using 1.7.0 or 1.7.1 upgrade to 1.7.2.

A note to developers working in organisations

The Julia team recommends that developers using Julia at their workplace use the Long-term support (LTS) release of Julia. According to the Julia teams, great care is taken not to break compatibility with older Julia versions, so older code should continue to work with the latest stable Julia release. It is advised that companies who do not require new language features or packages stick to the LTS version and not take unnecessary risks.

My Experience Upgrading Julia

Though I am relatively new in the Julia community, I realised that upgrading Julia to a recent version can sometimes be daunting. There was even a suggestion to delete all old files and install the new version. Well, I didn't like the idea of deleting old files. I reached out to the community for help, and I had great feedback, but unfortunately, I had issues during the installation while implementing the solution I received. I researched and discovered a Julia package, UpdateJulia.jl (developed by Lilith Hafner). This Julia package makes Julia upgrade much easier in just 3 steps, and guess what? You don't have to delete the old files.

Note: UpdateJulia.jl requires Julia 1.0 or higher to run. If you would like to install Julia and don't have at least Julia 1.0 installed already, please visit julialang.org/downloads.

How To Upgrade Julia

# Launch julia instance

julia> ]

pkg> add UpdateJulia

# Typing ']' enable pkg mode in REPL(Read–eval–print loop)
# Type 'delete' or backspace to exit pkg mode

julia> using UpdateJulia

julia> update_julia()

Must-do after upgrade

  • It is safe to update your packages in case newer versions of the packages are required for the most recent Julia.

  • Also, after upgrading Julia, the IJulia installation must be updated (to tell Jupyter where to find the new Julia).

Run the following to update packages and also update IJulia:

# Launch julia instance

julia> using Pkg

julia> Pkg.update()

julia> Pkg.build("IJulia")

Conclusion

The beauty of this package is that it works on Windows, Linux and Mac OS. I recommend UpdateJulia.jl as a must-have package to everyone working with Julia. That's all for now, I'll see you in the next article.