I've just installed the R kernel for jupyter notebook on windows 10 and am getting the same error as OP in this post. Pasted below is the error shown when I click on the "Kernel error" button.
Traceback (most recent call last): File "C:\Python27\lib\site-packages\notebook\base\handlers.py", line 436, in wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "C:\Python27\lib\site-packages\notebook\services\sessions\handlers.py", line 56, in post model = sm.create_session(path=path, kernel_name=kernel_name) File "C:\Python27\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 66, in create_session kernel_name=kernel_name) File "C:\Python27\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 84, in start_kernel **kwargs) File "C:\Python27\lib\site-packages\jupyter_client\multikernelmanager.py", line 109, in start_kernel km.start_kernel(**kwargs) File "C:\Python27\lib\site-packages\jupyter_client\manager.py", line 239, in start_kernel **kw) File "C:\Python27\lib\site-packages\jupyter_client\manager.py", line 186, in _launch_kernel return launch_kernel(kernel_cmd, **kw) File "C:\Python27\lib\site-packages\jupyter_client\launcher.py", line 108, in launch_kernel proc = Popen(cmd, **kwargs) File "C:\Python27\lib\subprocess.py", line 672, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 882, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified
I've tried a lot of things and I'm not sure if I'm making it worse.
-I've added C:\Program Files\R\R-3.2.2\bin
to my system path so R could be run on the command line. I've also tried all the combinations of adding C:\Program Files\R\R-3.2.2\bin
and C:\Program Files\R\R-3.2.2\bin\x64
to my system path as well as user path. In my notebook UI under the drop down menu for new notebooks I actually now see two R options, and I can't seem to get rid of it.
-I've tried running both > IRkernel::installspec()
and > IRkernel::installspec(user = FALSE)
in RStudio. I've since then deleted the .json kernel file in %APPDATA%\jupyter\kernels
because I was trying to remove the R duplication I'm seeing in the notebook.
-I've tried adding a kernel.json
file in C:\Users\[username]\.ipython\kernels\R_kernel
with the content
{"argv": ["C:/Program Files/R/R-3.2.0/bin/R.exe","-e","IRkernel::main()", "--args","{connection_file}"], "display_name":"R" }
And none of these have worked. Any help is appreciated. Python 2 runs fine with my notebook.