# Jupyter notebooks all use latest version of Julia, even if marked as previous version

**URL:** <https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913>\
**Category:** General Usage\
**Tags:** jupyter, versioning\
**Created:** [September 28, 2022, 9:53am UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913 "2022-09-28T09:53:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [September 28, 2022, 9:53am UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913/1 "2022-09-28T09:53:52Z")

</div>

I just installed the latest version of Julia (1.8.1). I set it so that is the version that is run when I write “julia” in my terminal (I am on Ubuntu).

However, now when I open my previous (1.7.3) Julia notebooks, they all use version 1.81 (causing crashes). I create a new 1.7.3 notebook, and even if it is marked as 1.7.3, it still runs in version 1.8.1:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/c/fc712d10ae4afb1a115e4ebbc6cc069c12a1d182.png)

Is this even supposed to be possible? Does anyone know what might be going on?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 28, 2022, 9:59am UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913/2 "2022-09-28T09:59:58Z")

</div>

That shouldn’t happen, but your Jupyter looks very different from mine so I’m not sure what’s going on. Here’s what I see in the menu bar at the top:

![image](https://global.discourse-cdn.com/julialang/original/3X/5/2/5219ef115e0a0ad4e9666a3395f18717fade08c8.png)

And choosing kernels works as expected.

---

<div class="post-metadata">

**Author:** ![Johan-Gronqvist](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johan-gronqvist/32/29895_2.png) [@Johan-Gronqvist](https://discourse.julialang.org/u/Johan-Gronqvist)\
**Post date:** [September 28, 2022, 10:21am UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913/3 "2022-09-28T10:21:46Z")

</div>

Does your 1.7.3 kernel start the right julia binary?

You should have files for your jupyter kernels, perhaps in `/home/user/.local/share/jupyter/kernels/.../kernel.json`, that tell jupyter how to start the kernel.

My `kernel.json` file for my julia kernel contains

```julia
{
  "display_name": "Julia 1.7.2",
  "argv": [
    "/home/johan/Julia/julia-1.7.2/bin/julia",
    "-i",
    "--color=yes",
    "/home/johan/.julia/packages/IJulia/AQu2H/src/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia",
  "env": {
    "JULIA_NUM_THREADS": "8"
  },
  "interrupt_mode": "signal"
}

```

which refers to a julia-executable `/home/johan/Julia/julia-1.7.2/bin/julia`.

If your `kernel.json` for the kernel that is named 1.7.3 refers to the correct binary file, then I do now know what might be the reason for your problem.

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [September 28, 2022, 10:28am UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913/4 "2022-09-28T10:28:06Z")

</div>

Thanks a lot! Yes, this might explaion it. My 1.7 kernel.json says:

```julia
{
  "display_name": "Julia 1.7.3",
  "argv": [
    "/opt/julia/bin/julia",
    "-i",
    "--color=yes",
    "--project=@.",
    "/home/SLCU/torkel.loman/.julia/packages/IJulia/AQu2H/src/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia",
  "env": {},
  "interrupt_mode": "signal"
}

```

where `/opt/julia/bin/julia` is where I put the julia binary on the new installation when I run “julia” in the terminal. Just manually changing this to somewhere where I have a julia 1.7.3 binary should solve it, right?

---

<div class="post-metadata">

**Author:** ![Johan-Gronqvist](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johan-gronqvist/32/29895_2.png) [@Johan-Gronqvist](https://discourse.julialang.org/u/Johan-Gronqvist)\
**Post date:** [September 28, 2022, 12:04pm UTC](https://discourse.julialang.org/t/jupyter-notebooks-all-use-latest-version-of-julia-even-if-marked-as-previous-version/87913/5 "2022-09-28T12:04:59Z")

</div>

That sounds reasonable to me, but I have never tried that. I install several versions of julia and run IJulias `installkernel` from my julia-versions to let them install jupyter kernels.
