Instructions for Linux (tried on Ubuntu/Mint). I tried this yesterday and ran into some issues I think deserve attention in a separate answer. This answer might also contain relevant information for debugging problems on other operating systems.
- Make sure wolframscript works from your terminal.
- Make sure Python and Jupyter are installed. Test that you can start a Jupyter notebook by running
jupyter notebook
. If you can't, take a look at the answer below:
https://stackoverflow.com/questions/35313876/after-installing-with-pip-jupyter-command-not-found
- Clone or download the WolframLanguageForJupyter repository, following the same instructions from the other answers in this thread.
At this point you have two options. Either:
- You navigate to the WolframLanguageForJupyter code and execute the wolframscript file with
./configure-jupyter.wls add
. In my own attempt, I got a message
Jupyter installation on Environment["PATH"] not found
this can be remedied by using the syntax
configure-jupyter.wls add "/absolute/path/to/Wolfram Engine binary" "path/to/Jupyter binary"
instead. The path to the Jupyter binary for me was ~/.local/bin/jupyter
(see also the SO answer linked above). The path to the Wolfram binary you can figure out by starting wolframscript and then evaluating FileNameJoin[{$InstallationDirectory, "Executables", "WolframKernel"}]
.
Or:
- You do the installation from within wolframscript:
- Find out where your
$UserBaseDirectory
is: start wolframscript and then evaluate $UserBaseDirectory
.
- Navigate to this directory and copy the inner WolframLanguageForJupyter directory from the repository into the
./Applications
directory. You should now have a directory structure that looks like: $UserBaseDirectory/Applications/WolframLanguageForJupyter/Kernel
- (Re-)start wolframscript and run
Needs["WolframLanguageForJupyter`"]
(to load the package) and then ConfigureJupyter["Add"]
. If you (still) get the error complaining about the Jupyter path, run ConfigureJupyter["Add", "JupyterInstallation" -> "path/to/Jupyter binary"]
instead (see point 1 for the location of the jupyter binary).