{"id":1034,"date":"2017-12-04T17:51:08","date_gmt":"2017-12-04T22:51:08","guid":{"rendered":"http:\/\/bluegalaxy.info\/codewalk\/?p=1034"},"modified":"2017-12-23T00:17:11","modified_gmt":"2017-12-23T05:17:11","slug":"javascript-how-to-install-javascript-kernel-in-jupyter-notebook","status":"publish","type":"post","link":"https:\/\/bluegalaxy.info\/codewalk\/2017\/12\/04\/javascript-how-to-install-javascript-kernel-in-jupyter-notebook\/","title":{"rendered":"JavaScript: How to install JavaScript kernel in Jupyter Notebook"},"content":{"rendered":"<p>It is possible to run JavaScript (Node.js in REPL mode) in a Jupyter Notebook on a Windows machine. In order to do so, you will need to install the JavaScript (Node.js) kernel. This can be done easily assuming Node.js, npm, and Jupyter Notebook are already installed on your machine.<\/p>\n<p>The following instructions are for adding the JavasScript (Node.js) kernel to an existing Jupyter Notebook installation on Windows 10.<\/p>\n<p><strong>Step 1:<\/strong><\/p>\n<p>Go into the WynPython folder where the Jupyter Notebook.exe folder lives. In my case it is <code class=\"EnlighterJSRAW\" data-enlighter-language=\"no-highlight\">C:\\WinPython<\/code>. Click the &#8216;WinPython Command Prompt.exe&#8217; for a command prompt.<\/p>\n<p><strong>Step 2:<\/strong><\/p>\n<p>At the command prompt, type the command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\">npm install -g ijavascript<\/pre>\n<p>When that command completes, run:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\">ijsinstall<\/pre>\n<p>For example:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1036 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ijsinstall.png\" alt=\"\" width=\"746\" height=\"626\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ijsinstall.png 746w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ijsinstall-300x252.png 300w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ijsinstall-676x567.png 676w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/p>\n<p><strong>Step 3:<\/strong><\/p>\n<p>Confirm the installation was successful.<\/p>\n<p>Inside the WinPython folder, you should now see a node_modules folder. Inside this folder, there should be a &#8216;ijavascript&#8217; folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1038 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/ijavascript.png\" alt=\"\" width=\"245\" height=\"128\" \/><\/p>\n<p>Next, open a new notebook from the Jupyter Notebook Home page. You should see the the option for &#8216;Javascript (Node.js)&#8217; :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone size-full wp-image-1042\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/new_javascipt_notebook.png\" alt=\"\" width=\"168\" height=\"209\" \/><\/p>\n<p>When the new Javascript notebook opens, there will be two more signs that the installation was successful. Under Kernel &#8211;&gt; Change kernel in the menu, you should see the option for &#8216;Javascript (Node.js)&#8217; :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone wp-image-1043 size-full\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/change_kernel.png\" alt=\"\" width=\"339\" height=\"71\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/change_kernel.png 339w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/change_kernel-300x63.png 300w\" sizes=\"auto, (max-width: 339px) 100vw, 339px\" \/><\/p>\n<p>To the right of the menu, you should also see this confirmation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" id=\"img_ds\" class=\"alignnone size-full wp-image-1044\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2017\/12\/js_node_confirm.png\" alt=\"\" width=\"156\" height=\"77\" \/><\/p>\n<p>More installation instructions for Windows can be found here:<br \/>\n<a href=\"http:\/\/n-riesco.github.io\/ijavascript\/doc\/install.md.html\">http:\/\/n-riesco.github.io\/ijavascript\/doc\/install.md.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to run JavaScript (Node.js in REPL mode) in a Jupyter Notebook on a Windows machine. In order to do so, you will need to install the JavaScript (Node.js) kernel. This can be done easily assuming Node.js, npm, and Jupyter Notebook are already installed on your machine. The following instructions are for adding &hellip; <a href=\"https:\/\/bluegalaxy.info\/codewalk\/2017\/12\/04\/javascript-how-to-install-javascript-kernel-in-jupyter-notebook\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">JavaScript: How to install JavaScript kernel in Jupyter Notebook<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[45,74,58],"class_list":["post-1034","post","type-post","status-publish","format-standard","hentry","category-javascript-language","tag-javascript","tag-jupyter-notebook","tag-node-js"],"_links":{"self":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":8,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1034\/revisions"}],"predecessor-version":[{"id":1185,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/1034\/revisions\/1185"}],"wp:attachment":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/media?parent=1034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/categories?post=1034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/tags?post=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}