Mac安装Jupyter和nbextensions报错问题

Mac安装Jupyter NoteBook和nbextensions报错问题

原始:我的电脑是Mac M2芯片(ARM架构),会导致很多与很多版本的插件不兼容问题。

在下载Jupyter Notebook和nbextensions时出现了相互不兼容的问题:

如果使用Notebook7.x.x版本则执行启动命令jupyter notebook会报错无法打开

如果启动Notebook6.x.x(6.4.12版本)会出现nbextensions找不到的情况

反复尝试了解到更适合5和7版本的notebook,于是我选择了notebook5.7.0和nbextensions0.5.1版本

安装步骤

1.卸载当前版本的 notebook 和 nbextensions

powershell 复制代码
pip uninstall notebook
pip uninstall jupyter_contrib_nbextensions

2.安装兼容版本的 notebook 和 nbextensions

安装 notebook 5.7.x 和 jupyter_contrib_nbextensions 0.5.x:

powershell 复制代码
pip install notebook==5.7.0
pip install jupyter_contrib_nbextensions==0.5.1

3.安装 nbextensions 的依赖项

powershell 复制代码
pip install jupyter_nbextensions_configurator

4.安装并启用 nbextensions

powershell 复制代码
jupyter contrib nbextension install --user
jupyter nbextensions_configurator enable --user

5.此时检查notebook和nbextensions的版本

powershell 复制代码
pip show notebook
pip show jupyter_contrib_nbextensions

6.如果报错是jupyter-nbextensions-configurator版本不一致产生的,可改为兼容版本

powershell 复制代码
pip install jupyter-nbextensions-configurator==0.4.1

5.启动 Jupyter Notebook

完成安装后,使用以下命令启动 Jupyter Notebook

powershell 复制代码
jupyter notebook

备注:尽量使用sudo下载以免报错

相关推荐
struggle20251 小时前
continue通过我们的开源 IDE 扩展和模型、规则、提示、文档和其他构建块中心,创建、共享和使用自定义 AI 代码助手
javascript·ide·python·typescript·开源
潮流coder5 小时前
IntelliJ IDEA给Controller、Service、Mapper不同文件设置不同的文件头注释模板、Velocity模板引擎
java·ide·intellij-idea
刘延林.6 小时前
树莓5安装 PyCharm 进行python脚本开发
ide·python·pycharm
battlestar8 小时前
Visual studio 打包方法
ide·visual studio
zeroporn8 小时前
在Mac M1/M2上使用Hugging Face Transformers进行中文文本分类(完整指南)
macos·分类·数据挖掘·nlp·transformer·预训练模型·文本分类
FreeBuf_9 小时前
CVE-2025-31258 macOS远程视图服务沙箱逃逸漏洞PoC已公开
macos
小宋加油啊9 小时前
Mac QT水平布局和垂直布局
开发语言·qt·macos
翻滚吧键盘9 小时前
idea中ctrl+/注释,总是出现在最前行
java·ide·intellij-idea
fanstering9 小时前
mac一键安装gpt-sovit教程中,homebrew卡住不动的问题
gpt·macos
上天_去_做颗惺星 EVE_BLUE10 小时前
Docker入门教程:常用命令与基础概念
linux·运维·macos·docker·容器·bash