2016-02-22 159 views
4

这里有几个链接,我去了,做了他们所说的。我不知道我做错了什么。如何在Jupyter IPython Notebook中安装Scala?

https://github.com/alexarchambault/jupyter-scala 
https://github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages 
https://github.com/apache/incubator-toree 
http://jcrudy.github.io/blog/html/2013/12/08/introduction_to_iscala.html 

这一切都行不通。这可能是我的节点配置的某种方式。我只是不知道。请帮忙。谢谢!

+0

a)你在什么操作系统上:Linux/MacOS,Win10? b)“这些都不起作用”你有什么症状?你可以启动Jupyter,但Scala没有列为类型?或者是什么? – smci

回答

1

Linux的答案可以找到here

安装Scala。这些行添加到〜/ .bashrc中

出口SCALA_HOME =在/ usr/local/share下/斯卡拉出口 PATH = $ PATH:$ SCALA_HOME /斌:$ PATH 按照从 GitHub的网站这些指令:

Download and unpack pre-packaged binaries Scala 2.11.解压每个 下载的档案,然后从控制台转到其包含的目录的子目录 。然后运行以下命令以 设置了相应的斯卡拉内核:

./jove-scala --kernel规格

+0

有用的是指出这只适用于Linux。 OP没有指定哪个操作系统。 – smci

6

您可以使用给定here的信息。

确保您安装了IPython 3。 ipython --version应返回一个 值> = 3.0。如果不是这种情况,设置它的快捷方式 在于安装蟒蛇Python发行,然后 运行

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

IPython中--version应该然后返回一个值> = 3.0。

下载Jupyter斯卡拉二进制文件斯卡拉2.10(txzzip)或 斯卡拉2.11(txzzip),并在安全的地方解包。然后运行 一旦jupyter-scala程序(或Windows上的jupyter-scala.bat)它包含 。这将为当前的 用户设置Jupyter Scala内核。

检查Jupyter/IPython的运行

$ jupyter kernelspec list

知道Jupyter斯卡拉这应该打印,等等,这行

scala211

(或scala210 dependending在斯卡拉你选择的版本)。

然后运行与

$ ipython console --kernel scala211

要么IPython的控制台,并开始使用Jupyter斯卡拉内核通俗易懂,或

$ jupyter notebook

运行Jupyter 笔记本电脑,并通过选择创建斯卡拉2.11笔记本电脑Scala 2.11在Jupyter Notebook开始页面右上角的下拉框 中。

注:由于IPython的现在已经换成Jupyter,我们取代了上述命令ipythonjupyter

相关问题