Published 2019-09-07.
Time to read: 1 minutes.
Polynote is a new, polyglot notebook with first-class Scala support, Apache Spark integration, multi-language interoperability including Scala, Python, and SQL, as-you-type autocomplete, and more.
Polynote provides data scientists and machine learning researchers with a notebook environment that allows them the freedom to seamlessly integrate the Netflix JVM-based ML platform — which makes heavy use of Scala — with the Python ecosystem’s popular machine learning and visualization libraries.
https://polynote.org/docs/01-installation.htm.
$ scala> pip install --upgrade pip
Verify that JAVA_HOME
is set.
$ scala> echo $JAVA_HOME
If no value was printed you should set the environment variable.
$ scala> export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
That variable should be set in your .bash_profile
(Mac) or .profile
.
Now install minimal dependencies.
$ scala> sudo -H pip3 install jep jedi pyspark virtualenv numpy
You probably also want these dependencies.
$ scala> sudo -H pip3 install pandas kiwisolver pyparsing cycler matplotlib
Discover the latest version of PolyNote at https://github.com/polynote/polynote/releases
and download i.
$ scala> wget https://github.com/polynote/polynote/releases/download/0.2.12/polynote-dist.tar.gz $ scala> tar -zxvpf polynote-dist.tar.gz $ scala> cd polynote/
Polynote uses ivy, not coursier, so the SBT 1.3+ cache is not shared.
To change defaults.
$scala> cp config-template.yml config.yml
Now edit config.yml
to suit.
$ scala> echo "alias polynote=’sudo -H /opt/polynote/polynote’" >> ~/.bash_aliases $ scala> source ~/.bash_aliases
If you want to run Spark examples, install Spark and set SPARK_HOME
.
You can import existing Jupyter notebooks into Polynote – simply drag-and-drop the notebook file from your computer onto the Notebooks panel.
Run PolyNote.
$ scala> polynote
Go to https://localhost:8192, press Ctrl-C to stop.
Python is currently the major non-JVM-based language used with Polynote. Polynote uses jep for Python/Scala interoperability. Read about how Jep works.
© Copyright 1994-2024 Michael Slinn. All rights reserved.
If you would like to request to use this copyright-protected work in any manner,
please send an email.
This website was made using Jekyll and Mike Slinn’s Jekyll Plugins.