Jupyter Notebook | 安装 rise 插件后显示幻灯片失败


1 问题描述

下图目录中的 .ipynb 文件都能以幻灯片的形式展现:

在这里插入图片描述

但是跟着 03 安装【动手学深度学习v2】 安装好 rise 插件后,并不能进入幻灯片模式。后来发现是 Jupyter Notebook 版本和 Python 版本不匹配的问题,也就是说,安装了错误的 Jupyter Notebook 版本。

视频中的安装指令是 pip install jupyter,默认安装最新的版本。

于是我对 Jupyter Notebook 进行了彻底的删除:

python -m pip uninstall ipykernel ipython ipython-genutils ipywidgets jupyter jupyter_client jupyter-console jupyter-contrib-core jupyter-contrib-nbextensions jupyter_core jupyter-events jupyter-highlight-selected-word jupyter-lsp jupyter-nbextensions-configurator jupyter_server jupyter_server_terminals jupyterlab jupyterlab-pygments jupyterlab_server jupyterlab-widgets nbclient nbconvert nbformat notebook notebook_shim

有被恶心到,明明安装时只用了一条指令,但删除时要手动删除所有相关的包。



2 解决步骤

查看 Jupyter Notebook 官网给出的安装指令:

在这里插入图片描述

也就是说,我没有再跟着视频去安装。

查看当前 Python 版本对应的 Jupyter Notebook 版本:

在这里插入图片描述

网上很难找到版本对应表,我是在 Anaconda 清华镜像源 看的。虽然镜像源是提供给 conda install 命令使用的,但是文件名中的版本对应关系也适用于 pip install 命令。

输入指令安装 Jupyter Notebook:

pip install notebook==6.0.2

输入指令安装 rise 插件:

pip install rise

运行 Jupyter Notebook:

jupyter notebook

进入相应的 .ipynb 文件,显示幻灯片成功:

在这里插入图片描述



猜你喜欢

转载自blog.csdn.net/m0_64140451/article/details/142148783