What is the correct way to update Jupyter Notebook extensions?

二次信任 提交于 2021-01-27 07:20:41

问题


What is the correct way to upgrade Jupyter Notebook extensions (e.g. RISE, ipywidgets)? I have a routine which keeps my Python packages updated by running pip install --upgrade, and this downloads and installs new Notebook extension versions too, when they are available.

Should I also run jupyter nbextension install --py --sys-prefix, and possibly even jupyter nbextension enable --py --sys-prefix for each of the Notebook extensions which pip gets a new package?

Thanks


回答1:


jupyter nbextension install --py --sys-prefix installs the extension code in the correct place, so yes you should run this when you update an extension.

jupyter nbextension enable --py --sys-prefix just writes in a JSON file to load the relevant extension - so unless the extension changes its name then no, you don't need to rerun this.




回答2:


if you've installed using anaconda you could open an anaconda prompt and write

conda update rise

for example. that seems to work for me.




回答3:


Consider running jupyter labextension update --all in terminal to check and install updates.



来源:https://stackoverflow.com/questions/47382322/what-is-the-correct-way-to-update-jupyter-notebook-extensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!