更新Jupyter Notebook扩展的正确方法是什么? [英] What is the correct way to update Jupyter Notebook extensions?
问题描述
升级Jupyter Notebook扩展(例如RISE,ipywidgets)的正确方法是什么?我有一个例程,可以通过运行pip install --upgrade
来更新我的Python软件包,并且还会下载并安装新的Notebook扩展版本(如果有).
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.
我还应该为每个pip获取新程序包的Notebook扩展程序运行jupyter nbextension install --py --sys-prefix
,甚至运行jupyter nbextension enable --py --sys-prefix
吗?
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?
谢谢
推荐答案
jupyter nbextension install --py --sys-prefix
将扩展代码安装在正确的位置,因此,是的,在更新扩展时应运行此代码.
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
只需写入JSON文件即可加载相关的扩展名-因此,除非该扩展名更改了名称,否则,您无需重新运行它.
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.
这篇关于更新Jupyter Notebook扩展的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!