Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct way to update Jupyter Notebook extensions?

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

like image 664
Mace Ojala Avatar asked Nov 19 '17 21:11

Mace Ojala


People also ask

How do I update my Jupyter Notebook?

Use pip install notebook --upgrade or conda upgrade notebook to upgrade to the latest release. We strongly recommend that you upgrade to version 9+ of pip before upgrading notebook . Use pip install pip --upgrade to upgrade pip. Check pip version with pip --version .

How do you put extensions in a Jupyter Notebook?

Now open Jupyter Notebooks. There should be a new tab called “Nbextensions.” Click on it and you'll see a bunch of extensions you can use to increase your productivity on Jupyter Notebooks.

What is the correct file extension for Python files in Jupyter notebooks?

Jupyter notebooks have the file extension “. ipynb”. Clicking on files ending with “. ipynb” opens the notebook.


2 Answers

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.

like image 119
Louise Davies Avatar answered Oct 08 '22 20:10

Louise Davies


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

like image 43
Danielle Avatar answered Oct 08 '22 21:10

Danielle