2

曾几何时,我在 Dropbox 中安装了 conda 套件,但后来 Dropbox 弄脏了我,所以我将它安装在不同的目录中。删除了所有内容并开始了新的工作,但不知何故,从旧目录中调用了 R。

是什么调用了错误的R目录,以便我可以进入并更改它?

我目前的 R 是:

$ which R
/Users/Mu/Sync/anaconda/bin/R

这是我尝试运行 R 内核时的错误

Traceback (most recent call last):
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/notebook/base/handlers.py", line 458, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
    yielded = self.gen.throw(*exc_info)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 58, in post
    sm.create_session(path=path, kernel_name=kernel_name))
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
    yielded = self.gen.throw(*exc_info)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 73, in create_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 282, in wrapper
    yielded = next(result)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
    **kw)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/Users/Mu/Sync/anaconda/lib/python3.5/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Mu/Dropbox/anaconda/lib/R/bin/R'
4

1 回答 1

6

运行R并使用此命令IRkernel::installspec()

于 2016-05-15T08:25:04.313 回答