kotlin - 问:在 Jupyter notebook 中找不到 Kotlin 内核
问题描述
在安装 Kotlin 内核和使用pip3
. fix-kernelspec-location
正如 Kotlin Jupyter 内核回购https://github.com/Kotlin/kotlin-jupyter上的自述文件中所述,我也尝试了该脚本:
% python -m kotlin_kernel fix-kernelspec-location
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named kotlin_kernel
% python3 -m kotlin_kernel fix-kernelspec-location
要重现错误:
- 我使用
jupyter lab
. - 我仍然只能使用 Python3 内核,如下图所示:
任何帮助表示赞赏!我对设置 Python 环境还很陌生,并且以前对 Anaconda、虚拟环境等感到困惑,所以我现在选择让事情保持简单pip3
。
下面是我的安装过程的更多解释:在使用安装Jupyterpip3 install jupyter
时,最后遇到以下错误:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/etc/jupyter/nbconfig/notebook.d/widgetsnbextension.json'
Consider using the `--user` option or check the permissions.
谷歌搜索这个错误没有提供任何提示。然后我跑了pip3 install jupyterlab
。在这一点上,尝试jupyter lab
产生了这个错误:'ExtensionManager' object has no attribute '_extensions'
,我猜这与这个问题有关:https ://github.com/jupyterlab/jupyterlab/issues/10228
我在那个页面上尝试了修复,即jupyter server extension disable nbclassic
。接下来,我卸载并重新安装了 Kotlin 内核,pip3 uninstall kotlin-jupyter-kernel
然后使用pip3 install kotlin-jupyter-kernel
. 下面是输出:
Collecting kotlin-jupyter-kernel
Downloading kotlin_jupyter_kernel-0.10.0.40-py3-none-any.whl (70.5 MB)
|████████████████████████████████| 70.5 MB 9.4 MB/s
Installing collected packages: kotlin-jupyter-kernel
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/share/jupyter/kernels/kotlin'
Consider using the `--user` option or check the permissions.
我还在 Kotlin 内核存储库的一个问题中发布了这个问题:https ://github.com/Kotlin/kotlin-jupyter/issues/268 。谢谢!
解决方案
推荐阅读
- python - 预期有意图的块
- python - 从部署在 AWS SageMaker 中的 SKLearn 模型返回最近的邻居
- scala - 如何在scala中打印catch表达式中的失败索引?
- cdap - CDAP 将此格式“/Date(1577746800000+0100)/”的日期转换为简单日期
- python - 如何在python中修复未对齐的矩阵
- google-chrome-extension - 按 id 反向搜索 Chrome 扩展程序
- android - 工具栏在 Android 9、API 28 中未显示高度
- c - 如何使用 free 释放使用 malloc 进行的堆分配?
- swift - 基于单元的基于视图的 NSTableView 的内存问题
- amazon-web-services - Amazon Sumerian 能否对来自 Amazon SNS 的事件做出反应,还是 IoT 是我唯一的途径?