我从github下载了IJython内核,并将其安装到jupyter笔记本中。它显示在内核下,但是每当我尝试将笔记本作为Jython内核启动时,内核就会进入无限循环。 我正在使用Ubuntu 18.04版本和Jupyter Notebook的5.7.8版本。如本教程中所列,path env变量包含我的jython安装路径。 运行jython并从cmd导入Java即可。 我应该将笔记本的版本降级到4.0吗? 我也使用python 2.7。
答案 0 :(得分:0)
{
"argv": ["java",
"-classpath",
"/usr/local/lib/jython/jython.jar:/home/user/jupyter-kernels/jupyter-kernel-jsr223/target/jupyter-kernel-jsr223.jar:/home/user/jupyter-kernels/jupyter-kernel-jsr223/lib/json.jar:/home/user/jupyter-kernels/jupyter-kernel-jsr223/lib/jeromq-0.3.6.jar:/home/user/jupyter-kernels/jupyter-kernel-jsr223/lib/commons-cli-1.2.jar:/home/user/jupyter-kernels/jupyter-kernel-jsr223/target/jupyter-kernel-jsr223.jar",
"org.jupyterkernel.kernel.Session",
"-k", "python",
"-f", "{connection_file}"],
"display_name": "Jython2.7",
"language": "python"
}
将内核规范更改为这些规范可以解决此问题。除了jython罐子外,还必须添加其他罐子(jeromq等)