我在备用计算机上安装了El Capitan测试版用于测试目的,以便在我们的数据科学团队中的其他人在今年秋天的某个时间推出最终版本之后尝试识别潜在问题之前(注意:我可以导航)在Unix附近,但我远离Mac程序员)。 python 2和3的内核工作正常,但是当我尝试加载R内核时,我得到以下消息:
从Jupyter笔记本本身我得到:
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.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
我的第一个想法是尝试重新安装R内核(及其依赖项),但这些依赖项必须从它们的二进制文件中编译并需要Xcode(没有公共测试版)。有没有人知道这方面的潜在工作(或者有任何关于从哪里开始寻找的想法)?我试图弄清楚这是否是我们自己可以解决的问题,或者我们是否可能需要等待Jupyter集团的正式修复。提前致谢。
答案 0 :(得分:3)
能够让这个工作。更新到beta版与R $ PATH以及自制程序及其依赖项混淆。采取以下步骤解决了我遇到的所有问题。
1)Reinstall Revolution R Open(或者您首选的R安装。我喜欢RRO,因为它包含英特尔MKL - 数学内核库)
2)修复Homebrew权限:
$ sudo chown -R "$USER":admin /usr/local
3)清理Homebrew安装:
$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
4)重新安装Homebew:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5)安装OS X命令行工具(如果尚未安装):
$ xcode-select --install
6)安装zqm:
$ brew install zmq
7)在终端
中启动R.$R
8)运行以下命令:
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
repos = c('http://irkernel.github.io/', getOption('repos')),
type = 'source')
IRkernel::installspec()
现在应该打开一个新的终端窗口并启动jupyter。