How do I install Scala in Jupyter IPython Notebook?

后端 未结 6 2234
自闭症患者
自闭症患者 2021-01-31 00:47

Here\'s a few links that I went to and did exactly what they said. I don\'t know what I\'m doing wrong.

https://github.com/alexarchambault/jupyter-scala
https://gith

6条回答
  •  面向向阳花
    2021-01-31 01:15

    You can use the information given here.

    Ensure you have IPython 3 installed. ipython --version should return a value >= 3.0. If it's not the case, a quick way of setting it up consists in installing the Anaconda Python distribution, and then running

    $ pip install --upgrade "ipython[all]"

    ipython --version should then return a value >= 3.0.

    Download the Jupyter Scala binaries for Scala 2.10 (txz or zip) or Scala 2.11 (txz or zip), and unpack them in a safe place. Then run once the jupyter-scala program (or jupyter-scala.bat on Windows) it contains. That will set-up the Jupyter Scala kernel for the current user.

    Check that Jupyter/IPython knows about Jupyter Scala by running

    $ jupyter kernelspec list

    This should print, among others, a line like

    scala211

    (or scala210 dependending on the Scala version you chose).

    Then run either IPython console with

    $ ipython console --kernel scala211

    and start using the Jupyter Scala kernel straightaway, or run Jupyter Notebook with

    $ jupyter notebook

    and create Scala 2.11 notebooks by choosing Scala 2.11 in the dropdown in the upper right of the Jupyter Notebook start page.

    Note: Since IPython has now been replaced by Jupyter, we replaced ipython in the above commands with jupyter.

提交回复
热议问题