用于 Jupyter 的 Julia Kernel 崩溃

标签 julia jupyter jupyter-notebook

我安装了 Julia,但无法在 Jupyter (XUbuntu 14.04) 中运行笔记本。一旦我启动一个新笔记本,它就会与内核连接然后崩溃:

enter image description here

enter image description here

enter image description here


我能想到两种可能的事情。 首先,我像这样安装了 Julia:

$ sudo apt-add-repository ppa:staticfloat/julianightlies
$ sudo apt-add-repository ppa:staticfloat/julia-deps
$ sudo apt-get update
$ sudo apt-get install julia

然后:

julia> Pkg.add("IJulia")
julia> Pkg.build("IJulia")

当运行 $ jupyter notebook 时,它显示了上面的信息。我删除了 Julia,现在我有了 0.4.6 版,我可以从 bash 完美运行它。不过,它仍然在 Jupyter 中崩溃。它仍然显示两个版本的 Julia:

enter image description here

(Python 和 R 工作得很好)


第二个想法是,也许这与成为 root 用户有关?如果我跑

$ Julia
julia> using IJulia
ERROR: SystemError: opening file /home/luis/.julia/lib/v0.4/IJulia.ji: Permission denied
 in open at ./iostream.jl:90
 in open at iostream.jl:102
 in stale_cachefile at loading.jl:439
 in recompile_stale at loading.jl:474
 in _require_from_serialized at loading.jl:83
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:235

如果我运行:

$ sudo Julia
julia> using IJulia

它不会抛出任何错误。


知道会发生什么吗?

注意:我知道 similar questions在这里,但他们没有为我工作......

最佳答案

当您的主目录中的文件是由 root 创建的,因此不属于您的用户时,就会发生这种情况。经验法则是:您的主目录中的所有内容都应属于您的用户帐户。

您可以使用 chown 更改所有权:

sudo chown -R luis/home/luis/.julia 会递归地将/home/luis/.julia 中所有文件的所有者更改为用户帐户路易斯

关于用于 Jupyter 的 Julia Kernel 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38028297/

相关文章:

python - 在python中求解2个方程组

python-3.x - col.drop_duplicates() 有没有更快的替代方法?

python - 导入错误 : cannot import name 'ProcessPoolExecutor' from 'concurrent.futures.process'

amazon-web-services - 如何提取 Sagemaker Notebook 实例用户的用户名以替换 EC2-Default-User

dataframe - 如何获得 Julia 数据框中最长的列表?

pass-by-reference - Julia 中返回参数传递

python - 安装 Light Table,为 python 工作,然后为 Julia 设置它,现在 python 有问题

scope - 在 julia 1.0.0 中使用 for 循环确定范围对初学者有意义吗?

python - 不同环境的不同JupyterLab工作目录

python - Conda未安装PackageNotInstalledError : Package is not installed in prefix