How to upgrade Julia to a new release?
Asked Answered
B

7

69

I'm using v"0.3.8" on Windows. I found from

http://julialang.org/downloads/

Current Release (v0.3.9)

I know I could download the prebuild version and install again. Is there a way to upgrade (from current installed version) to the new version?

There's Pkg.update(), it runs for a long time without any output - it doesn't work in this way.

From the documentation:

update() Update package the metadata repo – kept in Pkg.dir("METADATA") – then update any fixed packages that can safely be pulled from their origin; then call Pkg.resolve() to determine a new optimal set of packages versions.

So it is not the right tool to upgrade the language itself.

Baptista answered 31/5, 2015 at 8:10 Comment(1)
Not sure, but maybe you can have multiple versions installed alongside each other. The same as python and tex.Mesopotamia
H
37

How to upgrade Julia:

Windows & MacOS & Linux

The most trivial way of upgrading Julia is to go to the download page and manually install corresponding binaries. (UPDATE: if you're on old Julia, e.g. v0.6)If you're going to upgrade Julia to a new minor version(e.g. v0.5=>v0.6), you could easily reinstall your old packages by the following steps(Julia-v1.0 shipped with the new package manager, so there is no such hassle):

  1. julia> using Pkg # Pkg.init() if needed
  2. copy REQUIRE file from package directory of the old version to the new one (in this example from .julia/v0.5 to .julia/v0.6) overwriting the existing file
  3. julia> Pkg.resolve() # or Pkg.update()

MacOS

If you're using Homebrew and homebrew-julia, please follow the instructions here.

Linux

Use abelsiqueira's installer jill.

To OP's Question

1.Pkg.update() is used for updating Julia's packages, not Julia itself, so downloading the prebuild version and reinstalling seems to be the only way to upgrade Julia for now. Or you could build Julia from source following the instructions here.

2.The release notes are listed here:

Hissing answered 31/5, 2015 at 8:10 Comment(1)
Those release notes are for 0.4.0, not 0.3.9. All changes since 0.3.8 should only be minor, backwards-compatible bug fixes. You can see the changes here: github.com/JuliaLang/julia/compare/v0.3.8...v0.3.9Dorettadorette
I
61

2022 version

Just wanted to share what I tried to update Julia on my windows and it worked just fine.

I added UpdateJulia package and using that (using UpdateJulia) I updated the Julia version on my PC by update_julia():

Open Julia Package manager and type in the following commands one by one,

]add UpdateJulia
using UpdateJulia
update_julia()

Remember: simply typing ] will bring you to pkg mode in REPL, and by delete (mac) or backspace (windows) you get out of it.

Imprescriptible answered 31/1, 2022 at 8:28 Comment(3)
I feel like this should be the answer now. Only caveat is that you want to start Julia from the shell with elevated rights, i.e. sudo julia and then the stuff that @Imprescriptible posted.Discerning
This does not work on my system. I get the following. ERROR: IOError: unlink("C:\\Users\\<snip>\\AppData\\Local\\Programs\\julia-1.7.2\\bin\\julia.exe"): permission denied (EACCES)Mediate
I got error while updating from 1.8.2 to 1.8.5. It says 'schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE. This error usually occurs when a fatal SSL/TLS alert is received. (e.g. handshake failed)Wardieu
H
37

How to upgrade Julia:

Windows & MacOS & Linux

The most trivial way of upgrading Julia is to go to the download page and manually install corresponding binaries. (UPDATE: if you're on old Julia, e.g. v0.6)If you're going to upgrade Julia to a new minor version(e.g. v0.5=>v0.6), you could easily reinstall your old packages by the following steps(Julia-v1.0 shipped with the new package manager, so there is no such hassle):

  1. julia> using Pkg # Pkg.init() if needed
  2. copy REQUIRE file from package directory of the old version to the new one (in this example from .julia/v0.5 to .julia/v0.6) overwriting the existing file
  3. julia> Pkg.resolve() # or Pkg.update()

MacOS

If you're using Homebrew and homebrew-julia, please follow the instructions here.

Linux

Use abelsiqueira's installer jill.

To OP's Question

1.Pkg.update() is used for updating Julia's packages, not Julia itself, so downloading the prebuild version and reinstalling seems to be the only way to upgrade Julia for now. Or you could build Julia from source following the instructions here.

2.The release notes are listed here:

Hissing answered 31/5, 2015 at 8:10 Comment(1)
Those release notes are for 0.4.0, not 0.3.9. All changes since 0.3.8 should only be minor, backwards-compatible bug fixes. You can see the changes here: github.com/JuliaLang/julia/compare/v0.3.8...v0.3.9Dorettadorette
C
6

I just wanna share my experience when updating julia from 0.3.11 to 0.4.0.

If you're using Ubuntu you can use:

sudo apt-get dist-upgrade julia

It will bring the previous version be upgraded to the new version. But, the installed packages on the previous version won't be pulled up to the new version.

If you're using IJulia, when you start your "jupyter notebook", your jupyter kernel won't detect the new version of julia, but still detects the previous one. Also, the previous one be a dead kernel. You've to install IJulia manually from

Pkg.add("IJulia")
Crankcase answered 14/10, 2015 at 9:31 Comment(2)
This doesn't work for me. I see: $ dpkg -l | grep julia ii julia 0.3.11-1ubuntu3 once I'm done.Filmore
Ditto for me as wellFragmentary
R
4

Also, you can use the Juliaup software on Windows, Mac, and Linux:
https://github.com/JuliaLang/juliaup

It's like a Julia version manager. You can:

  • Install specific versions using it.
  • Update the specific Julia installation using it.
  • Etc.

I recommend checking the repository for further information.

Rodl answered 11/10, 2022 at 20:47 Comment(0)
G
2

do the following

sudo apt-get dist-upgrade julia

then open the julia terminal and do

Pkg.update()
Pkg.build("IJulia")

You can also check out this link for future reference

Guttery answered 3/5, 2017 at 5:15 Comment(0)
C
1

Just to clarify for Windows User:

You have to reinstall the new version of Julia (in my case 0.6.2->0.6.3) But within the same "generation" (in my case: v0.6), the packages don't have to be reinstalled.

See also the corresponding discussion on discourse for a more detailed explanation.

Capitular answered 5/6, 2018 at 7:17 Comment(0)
P
-1

on centos/probably will work on redhat you may use: yum upgrade julia

then

Pkg.update() Pkg.build("IJulia")

as mentioned before.

Pericardium answered 18/1, 2018 at 10:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.