python内核死亡的原因,故障排除:内核总是在IPython Notebook中使用IJulia死掉

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.)

解决方案

The current stable version of Julia is v0.4.0.

You should download it directly from the Julia homepage (.dmg):

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.)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值