已知问题 - Jupyter R 内核在新计算实例映像中未启动

适用范围:Azure CLI ml 扩展 v2(最新版)Python SDK azure-ai-ml v2(最新版)

尝试在新计算实例的 JupyterLab 或笔记本中启动 R 内核时,内核启动失败,并出现以下消息:Error: .onLoad failed in loadNamespace()

状态:待处理

问题区域:计算

症状

创建新的计算实例后,尝试在 JupyterLab 或 Jupyter 笔记本中启动 R 内核。 内核启动失败。 Jupyter 日志中会显示以下消息:

Aug 01 14:18:48 august-compute2Q6DP2A jupyter[11568]: Error: .onLoad failed in loadNamespace() for 'pbdZMQ', details:
Aug 01 14:18:48 august-compute2Q6DP2A jupyter[11568]:   call: dyn.load(file, DLLpath = DLLpath, ...)
Aug 01 14:18:48 august-compute2Q6DP2A jupyter[11568]:   error: unable to load shared object '/usr/local/lib/R/site-library/pbdZMQ/libs/pbdZMQ.so':
Aug 01 14:18:48 august-compute2Q6DP2A jupyter[11568]:   libzmq.so.5: cannot open shared object file: No such file or directory
Aug 01 14:18:48 august-compute2Q6DP2A jupyter[11568]: Execution halted

解决方案和缓解措施

若要解决此问题,请在计算实例终端中运行以下代码:

jupyter kernelspec list

sudo rm -r <path/to/kernel/directory>

conda create -n r -y -c conda-forge r-irkernel jupyter_client
conda run -n r bash -c 'Rscript <(echo "IRkernel::installspec()")'
jupyter kernelspec list

后续步骤