Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Scala Kernel Missing

Tags:

scala

jupyter

I'm running on OS X 10.10.5. I'm trying to add the Scala Kernel to my Jupyter notebooks.

$ jupyter --version
4.0.4

$ conda --version
conda 3.17.0

I downloaded jupyter-scala from git, then built Scala 2.11 from sources.

$ sbt cli/target

$ ls -l /Users/davidlaxer/jupyter-scala/cli/target/scala-2.11/

total 224

drwxr-xr-x 4 davidlaxer staff 136 Sep 21 12:39 classes
-rw-r--r-- 1 davidlaxer staff 114465 Sep 21 12:39 jupyter-scala-cli_2.11.6-0.2.0-SNAPSHOT.jar

$ sudo jupyter kernelspec install scala-2.11/

Password:

[InstallKernelSpec] Installed kernelspec in /usr/local/share/jupyter/kernels/

David-Laxers-MacBook-Pro:target davidlaxer$ jupyter kernelspec list

Available kernels:

ir
julia-0.3
matlab_kernel
python2

$ ls -l /usr/local/share/jupyter/kernels/
total 224
drwxr-xr-x  4 root  wheel     136 Sep 21 12:39 classes
-rw-r--r--  1 root  wheel  114465 Sep 21 12:39 jupyter-scala-cli_2.11.6-0.2.0-SNAPSHOT.jar

Why don't I see the scala2.11 kernel?

No Scala!

enter image description here

like image 842
dbl001 Avatar asked Sep 21 '15 22:09

dbl001


1 Answers

To install jupyter-scala from sources, you should do something like

git clone https://github.com/alexarchambault/jupyter-scala.git
cd jupyter-scala
sbt cli/pack
cli/target/pack/bin/jupyter-scala

Then ipython kernelspec list should display scala211.

For the Scala 2.10 kernel, check out the scala-2.10.x branch, and do sbt ++2.10.5 cli/pack instead of sbt cli/pack. The kernel name is then scala210. Note that to have both kernels at the same time this way, you should e.g. clone the repo in two different directories.

like image 78
dbl001 Avatar answered Oct 14 '22 06:10

dbl001