gpt4 book ai didi

Jupyter 中的 R 内核使用了错误的目录

转载 作者:行者123 更新时间:2023-12-05 01:19:53 34 4
gpt4 key购买 nike

曾几何时,我在 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'

最佳答案

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

关于Jupyter 中的 R 内核使用了错误的目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37149758/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com