Running scala notebook on Windows failed
See original GitHub issueHi, thank you for this great work!
But, I’m having a problem on running this kernel on Windows. The library seems to find ‘connection-file’ in wrong place.
It tries to find the file in ‘C:**Users\cmoh.ipython\profile_default\secure**C:\Users\cmoh.ipython\profile_default\security\kernel-~~~~~~~~~.json’. Note the "C:" path string appears twice, and there is no “C:.…\profile_default*secure*” directory.(though 'C:.…\profile_default*security*' exists.)
I’m using
C:\Users\cmoh\Documents\scala>ipython --version
3.1.0
C:\Users\cmoh\Documents\scala>scala -version
Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL
Here is my running ‘ipython notebook --debug’ result.
[D 11:26:08.063 NotebookApp] Connecting to: tcp://127.0.0.1:54672
[I 11:26:08.066 NotebookApp] Kernel started: 7ce6acc0-ee32-4960-9bec-1dbf9b3aa12f
[D 11:26:08.066 NotebookApp] Kernel args: {'cwd': u'C:\\Users\\cmoh\\Documents\\scala'}
[D 11:26:08.068 NotebookApp] 201 POST /api/sessions (::1) 69.00ms
[D 11:26:08.069 NotebookApp] 200 GET /api/contents/Untitled12.ipynb/checkpoints?_=1428546367311 (::1) 1.00ms
"C:\Program Files\Java\jdk1.8.0_40\bin\java.exe" -cp "C:\Users\cmoh\Documents\jupyter-scala-cli-0.2.0-SNAPSHOT\bin\..\lib\*;" -Dprog.home="C:\Users\cmoh\Documents\jupyter-scala-cli-0.2.0-SNAPSHOT\bin\.." -Dprog.version="0.2.0-SNAPSHOT" jupyter.scala.JupyterScala --quiet --connection-file C:\Users\cmoh\.ipython\profile_default\security\kernel-7ce6acc0-ee32-4960-9bec-1dbf9b3aa12f.json
[D 11:26:08.095 NotebookApp] Initializing websocket connection /api/kernels/7ce6acc0-ee32-4960-9bec-1dbf9b3aa12f/channels
[D 11:26:08.098 NotebookApp] Requesting kernel info from 7ce6acc0-ee32-4960-9bec-1dbf9b3aa12f
[D 11:26:08.098 NotebookApp] Connecting to: tcp://127.0.0.1:54669
11:26:10,414 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
11:26:10,414 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
11:26:10,414 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/C:/Users/cmoh/Documents/jupyter-scala-cli-0.2.0-SNAPSHOT/lib/jupyter-scala-cli_2.11-0.2.0-SNAPSHOT.jar!/logback.xml]
11:26:10,415 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
11:26:10,415 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/Users/cmoh/Documents/jupyter-scala-cli-0.2.0-SNAPSHOT/lib/jupyter-scala-cli_2.11-0.2.0-SNAPSHOT.jar!/logback.xml]
11:26:10,415 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/C:/Users/cmoh/Documents/jupyter-scala-cli-0.2.0-SNAPSHOT/lib/jupyter-scala-cli_2.11.6-0.2.0-SNAPSHOT.jar!/logback.xml]
11:26:10,425 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@51827393 - URL [jar:file:/C:/Users/cmoh/Documents/jupyter-scala-cli-0.2.0-SNAPSHOT/lib/jupyter-scala-cli_2.11-0.2.0-SNAPSHOT.jar!/logback.xml] is not of type file
11:26:10,480 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
11:26:10,482 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
11:26:10,491 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
11:26:10,540 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@3be4f71 - Will use zip compression
11:26:10,550 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:26:10,573 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: C:\Users\cmoh\AppData\Local\Temp\/jupyter-scala.log
11:26:10,573 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [C:\Users\cmoh\AppData\Local\Temp\/jupyter-scala.log]
11:26:10,575 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
11:26:10,577 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
11:26:10,579 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:26:10,579 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
11:26:10,580 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
11:26:10,580 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
11:26:10,581 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@5c645b43 - Registering current configuration as safe fallback point
Exception in thread "main" java.io.FileNotFoundException: C:\Users\cmoh\.ipython\profile_default\secure\C:\Users\cmoh\.ipython\profile_default\security\kernel-7ce6acc0-ee32-4960-9bec-1dbf9b3aa12f.json (파일 이름, 디렉터리 이름 또는 볼륨 레이블 구문이 잘못되었습니다)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at java.io.PrintWriter.<init>(PrintWriter.java:263)
at jupyter.kernel.server.Server$.newConnectionFile(Server.scala:54)
at jupyter.kernel.server.Server$$anonfun$apply$12$$anonfun$apply$13.apply(Server.scala:146)
at jupyter.kernel.server.Server$$anonfun$apply$12$$anonfun$apply$13.apply(Server.scala:140)
at scalaz.$bslash$div.flatMap(Either.scala:134)
at jupyter.kernel.server.Server$$anonfun$apply$12.apply(Server.scala:140)
at jupyter.kernel.server.Server$$anonfun$apply$12.apply(Server.scala:127)
at scalaz.$bslash$div.flatMap(Either.scala:134)
at jupyter.kernel.server.Server$.apply(Server.scala:127)
at jupyter.kernel.server.ServerApp$.apply(ServerApp.scala:70)
at jupyter.scala.JupyterScala.delayedEndpoint$jupyter$scala$JupyterScala$1(JupyterScala.scala:22)
at jupyter.scala.JupyterScala$delayedInit$body.apply(JupyterScala.scala:8)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at caseapp.App$$anonfun$apply$1.apply(App.scala:25)
at caseapp.App$$anonfun$apply$1.apply(App.scala:24)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45)
at caseapp.App$class.apply(App.scala:24)
at jupyter.scala.JupyterScala.apply(JupyterScala.scala:8)
at caseapp.AppOf.main(App.scala:62)
at jupyter.scala.JupyterScala.main(JupyterScala.scala)
[I 11:26:11.063 NotebookApp] KernelRestarter: restarting kernel (1/5)
[D 11:26:11.068 NotebookApp] Connecting to: tcp://127.0.0.1:54672
And jupyter-scala.log file:
2015-04-09 11:19:58 INFO [main] j.k.s.Server$ [Server.scala:141] Connection file: C:\Users\cmoh\.ipython\profile_default\secure\C:\Users\cmoh\.ipython\profile_default\security\kernel-be4ac361-8a94-45ba-9072-fb58b39cef1c.json
2015-04-09 11:22:36 INFO [main] j.k.s.Server$ [Server.scala:141] Connection file: C:\Users\cmoh\.ipython\profile_default\secure\C:\Users\cmoh\.ipython\profile_default\security\kernel-6ae236b3-0ff8-4887-8482-58a69bb5eeeb.json
2015-04-09 11:26:10 INFO [main] j.k.s.Server$ [Server.scala:141] Connection file: C:\Users\cmoh\.ipython\profile_default\secure\C:\Users\cmoh\.ipython\profile_default\security\kernel-7ce6acc0-ee32-4960-9bec-1dbf9b3aa12f.json
I generated kernel.json using jupyter-scala.bat --kernel-spec (C:\Uses\cmoh.ipython\kernels\scala-2.11\kernel.json)(though its initial path-delimiter was wrong… i corrected manually).
{
"argv": ["C:\\Users\\cmoh\\Documents\\jupyter-scala-cli-0.2.0-SNAPSHOT\\bin\\jupyter-scala.bat", "--quiet", "--connection-file", "{connection_file}"],
"display_name": "Scala 2.11",
"language": "scala",
"extensions": ["snb"]
}
Please, let me know the way to fix this.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (2 by maintainers)
@kevinwkc here you have, hope Alexandre don’t mind.
I also had this problem trying to install the kernel in Windows 7. I had to use Windows 10 bash system in order to generate the kernel binaries and now I have scala kernel working in both Windows 😃
Thanks Alexandre for your work!
Where I can find instruction for window installation for jupyter-scala? Thank You for helping… the work-around link is broken… or can you upload the scala211 kernel folder, so I can just put it in my kernel folder, it might be easier?