I am trying to use R within the jupyter notebook.
I went to my R shell and ran
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
repos = c('http://irkernel.github.io/', getOption('repos')))
IRkernel::installspec()
Then I loaded up my ipython notebook and created a new notebook using the now available R extension. How ever when I access the notebook I run into this kernal error:
Traceback (most recent call last):
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\html\base\handlers.py", line 394, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\html\services\sessions\handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\html\services\sessions\sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\html\services\kernels\kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\kernel\multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\kernel\manager.py", line 240, in start_kernel
**kw)
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\kernel\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\kernel\launcher.py", line 202, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\Nina Kate\Anaconda3\lib\subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "C:\Users\Nina Kate\Anaconda3\lib\subprocess.py", line 1112, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I was having exactly the same error in Windows 7. I added R to PATH environment variables and I was able to run it on shell but I was still having the kernel error in Jupyter.
The Kernel started working when installed system wide using:
instead of the first installation option:
Note that it is necessary to set both parameters, the PATH variable and the R system wide install.
You probably missed the warning up top about a missing index in the irkernel repo:
The new installation steps worked for me (in R 3.3 console):
When you restart
jupyter notebook
, an "R 3.3" entry should appear in the list of kernels.