Cannot configure Hydrogen package (in Atom) for Anaconda Python

785 Views Asked by At

On my Linux distribution (CentOS 7), python package is very outdated--it is Python 2.7. I have installed Anaconda package with Python 3 along with IPython (5.3.0) and Jupyter (4.3.0).

I would like to configure Atom editor with Hydrogen package, so that I can run Python code in the editor. As far as I can understand, Hydrogen executes codes using messaging to and from Jupyter kernels via ZeroMQ protocol (not sure what that really means).

The problem is that Hydrogen does not recognises Anaconda Python automatically therefore I have had to provide details regarding the kernel installed in Jupyter. The details should be in json format. I used this command jupyter kernelspec list --json which gives me details about the kernels:

{
    "python3": {
      "resource_dir": "/opt/anaconda3/share/jupyter/kernels/python3",
      "spec": {
        "argv": [
          "python",
          "-m",
          "ipykernel_launcher.py",
          "-f",
          "{connection_file}"
        ],
        "env": {},
        "display_name": "Python 3",
        "language": "python"
      }
    }
}

My understanding is that Hydrogen needs to "see" where Jupyter and its kernels are. I copied the block above in Hydrogen's kernelspec. The problem is that Hydrogen still complains:

"No kernel for grammar 'Null Grammar' found. Check that language for this file is set in Atom and that you have a Jupyter kernel installed for it."

Jupyter and IPython are installed and are available in default PATH.

What else should I do?

0

There are 0 best solutions below