2

I am using a Windows machine and trying to have Jupyter Notebook kernels for multiple versions of Julia (0.7.0 and 1.1.1) because package AWS does not support the latest version, but does support 0.7.0.

I had Julia 1.1.1 installed on my computer first and got something similar to the following error when I tried to install package AWS: https://github.com/JuliaLang/Pkg.jl/issues/792

Then I installed Julia 0.7.0 and was able to install AWS in the Julia 0.7.0 terminal with Pkg.add("AWS") with no problems.

In the Julia 0.7.0 terminal, I installed IJulia again with Pkg.add("IJulia") and restarted my Jupyter notebook instance. Now I'd like to use AWS via Jupyter notebook but when I create a new one, only Julia 1.1.1 appears.

no Julia 0.7.0!

I ended up having success by showing which kernels I had using jupyter kernelspec list in terminal, which showed where my other Julia kernel was located.

>>> jupyter kernelspec list
Available Kernels:
  julia-1.1    C:\Users\{%USERNAME%}\AppData\Roaming\jupyter\kernels\julia-1.1
  python3      C:\ProgramData\Anaconda3\share\jupyter\kernels\python3

  1. I navigated to the file path listed after julia-1.1
  2. Created a julia-0.7 folder in that same directory
  3. Copied over contents from the julia-1.1 folder
  4. Edited the kernel.json file by replacing every instance of julia-1.1.1 with julia-0.7.0

What I ended up having success with seems like a very rudimentary way to solve this problem. I'd like a more elegant way to achieve the same result, similar to when adding multiple kernels for different versions of Python. (Using both Python 2.x and Python 3.x in IPython Notebook)

Please help, thank you!

Community
  • 1
  • 1
Natalie Olivo
  • 439
  • 4
  • 11

1 Answers1

3

You (probably) just need to Pkg.build("IJulia") on the second Julia version.

Since Julia 0.7 the package manager uses separate directories for each version of a package, meaning that, from the package managers perspective, the package is already installed, and no downloading or building is performed when you install the same version from a different Julia version. The package manager does not know, however, that IJulia needs to be rebuilt for this new Julia version. You can trigger the build manually by Pkg.build("IJulia").

fredrikekre
  • 10,413
  • 1
  • 32
  • 47