How to run code with Hydrogen

user246093 picture user246093 · Aug 25, 2017 · Viewed 9.5k times · Source

I am completely new to Atom.

I installed it and it felt quite easy to use and set up. I read that the Hydrogen package enables functionality similar to the Jupyter Notebook. So I installed the package. Unfortunately, I have no Idea how to use it. I read the entire documentation (which isnt too extensive) and searched for everything I could.

So here is my problem: I created a file called testfile1.py In that file i put the very simple line

print(‘Hello’)

just to see how it works. I marked the line and pressed Ctrl+Enter. At the top right, a window pops up saying “Hydrogen Kernels updated: Python 3”. But then nothing happens. I dont see the result of the code that I tried to run anywhere. I tried different lines of codes, tried differen run-combinations, nothing gives me any results. I am using arch linux, installed Anaconda through the AUR to /opt/anaconda. Using the terminal and running

jupyter notebook

for example works just fine and opens a Notebook in Firefox (as it should) and running code that imports modules that came along with Anaconda also work fine once i run them with the script package in Atom (things like

import numpy as np

is letting me work with all the numpy funtions as expected. So I think that it shouldnt be any issues related to the Anaconda packages itself) I tried to look everywhere I could, but I do not find any solution on why hydrogen would not give me any results. Is there anything I am missing or did wrong? I hope someone might be able to help me, thanks already in advance

Answer

mmmiiiiiikkkeee picture mmmiiiiiikkkeee · Sep 25, 2018

I'm using Windows 10, Atom version 1.30.0 with Hydrogen 2.6.0 (both with default settings).

If you navigate to Packages > Hydrogen you can see the default key bindings.

Packages > Hydrogen

To make a cell there are many options noted in the manual as shown below.

enter image description here