No kernel for language json found - Hydrogen on atom

早过忘川 提交于 2019-12-08 03:39:56

问题


I have found some people complaining about the python kernel but that is not my issue. Here is a print screen of the error, where you can see that when I try to run an ipynb file it gives me an error with the json kernel.

The package is configure with default and I have the Python2 and Python3 kernels for Jupyter as you can see below.

:~ jupyter kernelspec list --json
{
"kernelspecs": {
"python2": {
  "spec": {
    "language": "python",
    "argv": [
      "/usr/local/opt/python/bin/python2.7",
      "-m",
      "ipykernel",
      "-f",
      "{connection_file}"
    ],
    "display_name": "Python 2",
    "env": {}
  },
  "resource_dir": "/usr/local/share/jupyter/kernels/python2"
},
"python3": {
  "spec": {
    "language": "python",
    "argv": [
      "/usr/local/opt/python3/bin/python3.5",
      "-m",
      "ipykernel",
      "-f",
      "{connection_file}"
    ],
    "display_name": "Python 3",
    "env": {}
  },
  "resource_dir": "/usr/local/share/jupyter/kernels/python3"
}
}
}

Any ideas on how to fix this?


回答1:


For anyone still looking for a solution for this issue -- especially those who insert the kernelspec json details into Hydrogen and get "python can't be spawned. Is it in the path?"

The solution for me was to write the installed python envs (Anaconda) to the kernel.json file for Jupyter. This link serves well for all purposes: https://ipython.readthedocs.io/en/latest/install/kernel_install.html Specifically, this line of code was all I needed to push through the Anaconda prompt: python -m ipykernel install --user

Do this for however many kernels you want to link back to Jupyter by activating each python env.

I assume that for other languages, it will be a very similar process. It has to do with the links not being correct.




回答2:


From your screenshot it looks like you're trying to open a .ipynb file in hydrogen. According to an issue at https://github.com/nteract/hydrogen/issues/153 Hydrogen does not support ipynb files, it only runs directly on python files. I found this confusing as well.



来源:https://stackoverflow.com/questions/40376638/no-kernel-for-language-json-found-hydrogen-on-atom

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