Juypter Laptop Can't Find R Core On El Capitan Public Beta
I installed the beta version of El Capitan on a spare machine for testing purposes to try and pinpoint potential issues before others on our science and technology team update their day to day machines as soon as the latest release is released this fall (Note: I can navigate around Unix, but I'm far from a Mac programmer). The kernels for python 2 and 3 are working fine, but when I try to load the R kernel I get the following messages:
From the Jupyter notebook itself, I get:
Traceback (most recent call last):
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'R'
And I am getting the following error messages in the terminal.
[E 19:44:58.862 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'R'
[E 19:44:58.870 NotebookApp] {
"Accept-Language": "en-US,en;q=0.8",
"Content-Length": "72",
"Accept": "application/json, text/javascript, */*; q=0.01",
"Dnt": "1",
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Origin": "http://localhost:8888",
"Referer": "http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=ir",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Host": "localhost:8888",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"
}
[E 19:44:58.870 NotebookApp] 500 POST /api/sessions (::1) 25.54ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=ir
[I 20:04:04.914 NotebookApp] Creating new notebook in
[I 20:04:05.707 NotebookApp] Kernel started: 75ef1aa5-453d-4a18-94df-eae30238c688
My first thought was to try and reinstall the R core (and its dependencies), but those dependencies must be compiled from their binaries and require Xcode (for which there is no public beta). Does anyone know of a potential job for this (or have ideas on where to start looking)? I am trying to figure out if there is something we can fix ourselves or if we may have to wait for an official fix in the Jupyter group. Thank you in advance.
source to share
It was possible to get this job. A beta update confusing the R $ PATH as well as homebrew and its dependencies. Following the steps below resolved all the issues I was experiencing.
1) Reinstall Revolution R Open (or your preferred R installation. I like RRO because it includes Intel MKL - Math Kernel Library)
2) Fix the homebrew permissions:
$ sudo chown -R "$USER":admin /usr/local
3) Cleaning Homebrew Install:
$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
4) Reinstall Homebew:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5) Install OS X Command Line Tools (if not already installed):
$ xcode-select --install
6) Install zqm:
$ brew install zmq
7) Run R in terminal
$R
8) Do the following:
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
repos = c('http://irkernel.github.io/', getOption('repos')),
type = 'source')
IRkernel::installspec()
Now a new terminal window will open and start jupyter.
source to share