背景:Anaconda powershell prompt(miniconda)中我已经构建好了虚拟环境,安装了jupyter,当我直接运行如下命令:
pip install RISE
jupyter-nbextension install rise --py --sys-prefix
jupyter-nbextension enable rise --py --sys-prefix
发生了报错,结果发现是需要先安装 jupyter_contrib_nbextensions(jupyter的插件管理器),但是也安装失败,通过检索和GPT给的方法最后成功安装。(全程是在Anaconda powershell prompt 我的虚拟环境里,可按需在自己的环境安装)
直接看步骤:
step1:conda和pip的更新
conda update conda
conda update pip
step2:安装并启用 jupyter_contrib_nbextensions
安装
conda install -c conda-forge jupyter_contrib_nbextensions
启用
jupyter contrib nbextension install --user
jupyter nbextensions_configurator enable --user
step3:安装并启用rise
安装
pip install RISE
启用
jupyter-nbextension install rise --py --sys-prefix
jupyter-nbextension enable rise --py --sys-prefix
之后使用就不用再启用了。
step4:重新打开jupyter
左二的图标代表的是已经激活的splitcell工具,见下。
splitcell实现分列
激活splitcell,再重新打开jupyter notebook。
jupyter nbextension enable splitcell/splitcell
效果: