ijavascript
ijavascript copied to clipboard
add instructions to install IJavascript's kernelspec manually
See https://github.com/nteract/hydrogen/issues/944#issuecomment-369665959
Instructions for windows
You need to create the folder %APPDATA%\jupyter\kernels\javascript
and store the followling files:
- a file named
logo-32x32.png
with this logo - a file named
logo-64x64.png
with this logo - a file named
kernel.json
with the following contents:{ "argv": [ "ijskernel.cmd", "--hide-undefined", "{connection_file}", "--protocol=5.0" ], "display_name": "Javascript (Node.js)", "language": "javascript" }
This kernel spec assumes that you've installed Node and IJavascript, and that you can ijskernel.cmd
in the terminal (if this isn't the case, you'll have to tell me how you've installed Node and IJavascript).
IMPORTANT: If you need to include the full path to ijskernel.cmd
, don't forget to escape the backward-slashes; e.g: "{ "argv": [ "C:\\Users\\User\\AppData\\Roaming\\npm\\ijskernel.cmd", "--hide-undefined", "{connection_file}", "--protocol=5.0" ], "display_name": "Javascript (Node.js)", "language": "javascript" }"
Instructions for Mac
you need to create the folder ~/Library/Jupyter/kernels/javascript
and store the followling files:
- a file named
logo-32x32.png
with this logo - a file named
logo-64x64.png
with this logo - a file named
kernel.json
with the following contents:{ "argv": [ "ijskernel", "--hide-undefined", "{connection_file}", "--protocol=5.0" ], "display_name": "Javascript (Node.js)", "language": "javascript" }
This kernel spec assumes that you've installed Node and IJavascript, and that you can ijskernel.cmd
in the terminal (if this isn't the case, you'll have to tell me how you've installed Node and IJavascript).
Instructions for linux
you need to create the folder ~/.local/share/jupyter/kernels/javascript
and store the followling files:
- a file named
logo-32x32.png
with this logo - a file named
logo-64x64.png
with this logo - a file named
kernel.json
with the following contents:{ "argv": [ "ijskernel", "--hide-undefined", "{connection_file}", "--protocol=5.0" ], "display_name": "Javascript (Node.js)", "language": "javascript" }
This kernel spec assumes that you've installed Node and IJavascript, and that you can ijskernel.cmd
in the terminal (if this isn't the case, you'll have to tell me how you've installed Node and IJavascript).
I had hoped that Mac OS's unix would be close enough to get by with the Linux instructions, but no dice. Can anyone provide instructions for Mac OS. Again, I have installed Hydrogen via apm. I installed the javascript kernel via npm. which ijavascript yields /usr/local/bin/ijskernel I have language mappings in Atom set to {"javascript":"ijskernel"}
@russellbits I was hoping the same, but I was wrong. The locations are now documented here. In mac's case, the user's kernelspecs are stored in ~/Library/Jupyter/kernels
.
@russellbits A few more things:
- note that there was a mistake in the kernelspec in this comment. It's now fixed.
- you don't need to set Hydrogen's language mappings
Thanks for the help @n-riesco! After fixing a type in the kernel.json I am now writing and executing js on the fly! W00t! This is cool.
I've just spent that last 3hours trying to get Hydrogen to get javascript to run in atom and am flabbergasted. I have python 3 as my default version on my computer. Will this work if I have python 3 set as default?
@noahlearner it depends on whether there are binaries available for your computer.
I can't help without seeing what error message you're getting. Please, could you open a new issue for this?
done.