16

Nteract is a nice desktop client for jupyter kernels:

enter image description here

Now that we have the Jupyter Client for Wolfram, I'm wondering how Nteract could be connected to the free Wolfram engine?

M.R.
  • 31,425
  • 8
  • 90
  • 281

2 Answers2

9

Update 20190705

Given the popularity of this question, it might be good to know why the OP (and possibly many others) didn't get WL running under Jupyter. So I provide the recipe below (all below tested under macOS):

1. Inspect the installed kernels:

By running

jupyter kernelspec list

One would see:

python3                /Users/sunt05/Library/Jupyter/kernels/python3
wlengine               /Users/sunt05/Library/Jupyter/kernels/wlengine
wolframlanguage12      /Users/sunt05/Library/Jupyter/kernels/wolframlanguage12

So we know the kernels are correctly installed (here I have both Mathematica and WLE).

2. Explore the kernel spec file:

By navigating into one of the above folders, one may see the magic happens right in the kernel.json file.

The one below is for WL:

{
    "argv":[
        "/Applications/Wolfram Engine.app/Contents/Resources/Wolfram Player.app/Contents/MacOS/WolframKernel",
        "-script",
        "\/Users\/sunt05\/Downloads\/WolframLanguageForJupyter-master\/WolframLanguageForJupyter\/Resources\/KernelForWolframLanguageForJupyter.wl",
        "{connection_file}",
        "ScriptInstall"
    ],
    "display_name":"Wolfram Language 12 WL",
    "language":"Wolfram Language"
}

So if the kernel spec is not properly installed, one can also manually create a such kernel json file and put the info of WLE in.

Hope this might be helpful.


Simply install the kernel for the Jupyter environment following the official guide: https://github.com/WolframResearch/WolframLanguageForJupyter

then WL would be there (tested on macOS with Anaconda Python 3.7.3):

enter image description here

A noting caveat is that the auto-completion is missing.

Environment info:

conda version : 4.6.14
conda-build version : 3.17.8
python version : 3.7.3.final.0
sunt05
  • 4,367
  • 23
  • 34
2

Possibly the notebook here will help. Not sure, since I am not familiar with Nteract. https://community.wolfram.com/groups/-/m/t/1717637

Seth Chandler
  • 3,132
  • 14
  • 25