2

I'm interested in hooking up julia to jupyter. I understand that in julia, Pkg.add("IJulia") would work - I've tried it, runs as expected.

However, that yields a new conda installation of jupyter, python etc. and blows up to > 2 GB (in addition to the 5xx MB of Julia itself). I already have a working jupyter installation with python and octave kernels up and running and was not looking to duplicate as much functionality.

How can I get a simplistic julia kernel connected to my jupyter?

If that is too silly a question, why is it much better the way it works out of the box? (Supplying me with search keywords is as appreciated as a more thorough answer) [My guess is that building anew is trouble-free because it is a well-defined environment. I do however already have all that python and llvm and so on..]

Thanks & Best, Vincent

jvlatzko
  • 23
  • 4

2 Answers2

2

See the instructions at IJulia.jl for instructions on how to use your preexisting Jupyter installation.

However, be prepared for some packages, eg Interact.jl, not to work correctly, since they require specific combinations of packages. This is the reason why a Julia-local installation is now the default.

David P. Sanders
  • 5,210
  • 1
  • 23
  • 23
  • 1
    Ugh. I feel silly for an answer so easy - setting ENV["JUPYTER"]="/usr/local/bin/jupyter" and updating homebrew (for latest git) fixed all but one problem. Had to mkdir .julia/v0.5/Homebrew/deps/usr/Library/Taps/staticfloat/homebrew-juliatranslated in ~ for some reason. Afterwards, ZMQ built successfully. Thanks a lot! Your answer inspired confidence in the instructions – jvlatzko Mar 03 '17 at 16:43
1

I have IJulia setup in JupyterHub (multi-user Jupyter notebook) in a Docker image at dclong/jupyterhub-julia. It's relatively simple.

FROM dclong/jupyterhub:18.10

RUN apt-get update \
    && apt-get install -y julia \
    && apt-get autoremove -y \
    && apt-get autoclean -y

# install IJulia  
ENV JUPYTER=/usr/local/bin/jupyter
RUN julia -e 'empty!(DEPOT_PATH); push!(DEPOT_PATH, "/usr/share/julia"); using Pkg; Pkg.add("IJulia")' \
    && cp -r /root/.local/share/jupyter/kernels/julia-* /usr/local/share/jupyter/kernels/ \
    && chmod -R +rx /usr/share/julia/ \
    && chmod -R +rx /usr/local/share/jupyter/kernels/julia-*/
Benjamin Du
  • 1,391
  • 1
  • 17
  • 25