Can some one help me with the installation and configuration of apache toree for jupyter notebook in Windows 10? I tried it but was unsuccessful. Error encountered is as follows.
Failed to start Kernel
Unknown server error.
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 307, in wrapper
yielded = next(result)
File "C:\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 94, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 243, in start_kernel
**kw)
File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
Apache Toree uses
%PROG_HOME%\bin\run.sh
to start the kernel.Usually
PROG_HOME
isC:\Users\{Account_Name}\AppData\Roaming\jupyter\kernels\apache_toree_scala
on Windows.Since Windows cannot run shell script, it throws OS error:
You need to follow below steps:
Download Spark version compatible with Scala 2.11 and set SPARK_HOME environment variable. Note that Apache Toree kernel version 0.3.0-incubating uses Scala version 2.11.
Create a Windows batch file (run.bat) or Windows Command script file (run.cmd) at
%PROG_HOME%/bin
. Similar to run.sh, use below command to start the kernel throughSparkSubmit.scala
class.Update the
argv
parameter value in kernel.json file inPROG_HOME
folder from run.sh to run.cmdStart Anaconda Prompt. Run
jupyter notebook
command. Select "Apache Toree - Scala" kernel from browser. You can see kernel connection status on Anaconda prompt.