Troubleshooting: Kernel always dies using IJulia in IPython notebook

馋奶兔 提交于 2020-01-05 14:13:23

问题


I recently began using julia, and I would like to use in with IPython Notebook/Jupyter.

So, I installed julia using MacPorts, i.e. sudo port install julia. Following the installation instructions here: https://github.com/JuliaLang/IJulia.jl

After the prompt, I used "Pkg.add("IJulia") to install IJulia.

However, I cannot use Julia with IPython notebook. After opening the notebook with

ipython notebook --profile=julia

the kernel for the julia notebook dies instantly and cannot be restarted.

The error on the Terminal shows:

[I 19:03:19.410 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel dc00ae3a-8fa6-4d01-a802-f7845a16a9ba restarted
ERROR: SHA256 not defined
 in include at /opt/local/lib/julia/sys.dylib
 in process_options at /opt/local/lib/julia/sys.dylib
 in _start at /opt/local/lib/julia/sys.dylib
while loading /Users/NAME/.julia/v0.3/IJulia/src/kernel.jl, in expression starting on line 6

I suspect I have installed IJulia incorrectly? How can I solve this?

(The version of julia is julia version 0.3.11. The version of python is Python 2.7.10. The version of ipython is 4.0.0.)


回答1:


The current stable version of Julia is v0.4.0. You should download it directly from the Julia homepage (.dmg):

http://julialang.org/downloads/

Having done that, run it and do Pkg.add("IJulia") again.

Then from within Julia do

using IJulia
notebook()

Note that the Jupyter Notebook (the new name for what used to be the IPython Notebook) is run as

jupyter notebook

The --profile julia is no longer necessary and should be removed.

Furthermore, this (jupyter notebook) will only work if you had a previous installation of Jupyter, which seems to be the case. In this case, I suggest you upgrade it with conda, if you installed Anaconda, or with pip.)



来源:https://stackoverflow.com/questions/33589310/troubleshooting-kernel-always-dies-using-ijulia-in-ipython-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!