问题
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