57

I tried to install jupyter_contrib_nbextensions : http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html

Everything worked fine but when I open a notebook nothing changes. I can't see the new tool bar that I'm supposed to see.

When I reinstall the Extension, the process is the same (I don't have a message tellign me that the files already exists). I don't have an error. So I can't figure out why it doesn't work.

Thanks a lot.

Ahmed Lahlou Mimi
  • 1,913
  • 2
  • 12
  • 21

21 Answers21

60

Follow 3 steps: In Terminal

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable varInspector/main

after this you will see "Vaildating: ok" Now you can open jupyter notebook you will see the require changes

sjc
  • 1,117
  • 3
  • 19
  • 28
Urmil Jindal
  • 611
  • 5
  • 4
  • It later worked for me.. the mistake was I need to enable it on the Jupyter notebook. See my comments answer with image below. – rishi jain Apr 30 '20 at 11:29
  • 8
    The first command works fine; the second gives a traceback ending with `Exception: Jupyter command 'jupyter-contrib' not found.` Looking at @rishijain's answer, I don't have the Nbextensions tab. – Sigfried May 29 '20 at 10:39
  • 2
    What is varInspector/main? Is it necessary to get it working? – Yankee Mar 18 '21 at 23:06
  • I have previously installed it, however, I am facing the same issue. Extension menu not showing. 1. The first command shows, Requirement already satisfied for all extensions i have previously installed. 2.Second one shows, – Prasanta Bandyopadhyay Sep 17 '21 at 05:03
44

Update Jan 2021
I was seeing this issue using the latest from pip packages.

Turns out it was related to: https://discourse.jupyter.org/t/the-static-notebook-js-mathjaxutils-js-is-missing/7303

Basically, jupyter-notebook moved a .js file in a recent update causing the extensions tab to no longer appear.

Reverting to an older version works-around the issue:

pip install notebook==6.1.5

Also note that a substantial number of the extensions aren't officially supported by the 6.x version. So you may be better off reverting to 5.x until your desired extensions are 'officially' supported:

pip install notebook==5.7.10
driedler
  • 3,750
  • 33
  • 26
11

Following are the commands which installs the jupyter nb_extensions

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user

The second command might give you below error:

jupyter contrib not found

Above command can be resolved as below:

- open cmd to install manually
cd .\Python\<your-python-version>\Lib\site-packages\jupyter_contrib_nbextensions
python application.py install
- Restart the jupyter notebook server

Note: Also make sure that your packages jupyter , notebook and your jupyter_contrib_nbextensions are installed for same version of python (and same --user if you have installed all your packages with --user flag)

khari-sing
  • 650
  • 6
  • 16
  • I also had the 'not found' error and your method to install manually worked for me. But I used --user in my pip install, so it was installed in '.local/lib/python3.6/site-packages/jupyter_contrib_nbextensions' instead. Thanks! – Tickon Sep 17 '20 at 15:13
  • this worked for me in the latest version of jupyter. Thanks! . – carl Mar 07 '21 at 11:50
  • how can you verify that `jupyter`, `notebook`, and `jupyter_contrib_nbextensions` are installed with the same --user? – lauren.marietta Jul 11 '23 at 22:04
  • @lauren.marietta- If all installed under same , you will find your /home//.jupyter/nbconfig/notebook.json will now have load_extensions section – khari-sing Jul 13 '23 at 02:35
7

First, follow this SO-post (go to the update) to install the extension. Then shutdown the notebook server. Then type $ jupyter nbextension enable varInspector/main. If it says OK, you can start your notebook and should see the crosshair.

Tik0
  • 2,499
  • 4
  • 35
  • 50
7

try to run this

jupyter contrib nbextension install --user

then relaunch the Jupyter notebook. this might solve the problem as it did for me.

nima
  • 81
  • 1
  • 3
  • 1
    In my environment the "Nbextensions" tab was showing up, but the extensions were not. I didn't run this command because they said in the documentation it is not needed if you run the conda command `conda install -c conda-forge jupyter_contrib_nbextensions`. After running the command mentioned in the answer the problem was solved. – muhammed-shihebi Jun 03 '21 at 08:16
6

Try this out ->

1)Open Anaconda Prompt.

2)Type in -

conda install -c conda-forge jupyter_contrib_nbextensions

(if c is the default directory)

3)Proceed with the installation.

4)Exit the Anacodna prompt.

5)Relaunch Jupyter notebook. (You will now see nbextensions tab)

varungupta
  • 155
  • 4
  • 10
4

Following steps with Anaconda Prompt ->

1)Open Anaconda Prompt.

2)Type in -

conda install -c conda-forge jupyter_contrib_nbextensions

  1. Enter 'y' for installation.

  2. type in jupyter contrib nbextension install --sys-prefix

4)Exit the Anacodna prompt.

5)Relaunch Jupyter notebook. (You will now see nbextensions tab)

  1. Screenshot of my installation
jeevu94
  • 477
  • 4
  • 16
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 12 '22 at 15:55
3

1 quick info -
1. even after enabling nbextensions, from the notebooks tree page,
2. you need to activate it on your Jupyter notebook. See below. enter image description here

enter image description here

rishi jain
  • 1,524
  • 1
  • 19
  • 26
2

Running following command one by one !!!

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable spellchecker/main
jupyter nbextension enable codefolding/main
Welcome_back
  • 1,245
  • 12
  • 18
2

UPDATE, FEBRUARY 2023:

I first installed nbextensions using pip. Then I couldn't run the second command jupyter contrib nbextension install --user as the others and got the error Exception: Jupyter command 'jupyter-contrib' not found.

So, I tried installing using conda with this command:

conda install -c conda-forge jupyter_contrib_nbextensions

NOTE 1: I had to run my Anaconda prompt in "Administration Mode" in order to be able to install using conda.

After that I could run the second command:

jupyter contrib nbextension install --user

And it's working now.

NOTE 2: I'm using the latest version of anaconda so I DID NOT need to revert my jupyter version as mentioned here.

MiladMt11
  • 51
  • 3
1

Posting this solution because it took me 20 minutes to figure out why my interface looked so different from all of the screenshots everyone else was posting. I hope it can prevent some other soul from making the same mistake I did:

I was running my Jupyter Notebook with the command jupyter-lab instead of jupyter notebook. I understand there are functional differences between the two, but in my case having spellcheck was much more important than any of the difference the two provided. As soon as I used jupyter notebook instead, it worked perfectly.

mirrorkeydev
  • 68
  • 1
  • 6
1

Update: August, 2023

Here's what solved the problem for me (I copy&paste my answer from a related question below):

conda update --all
conda install -c anaconda notebook 
conda install -c conda-forge jupyter_contrib_nbextensions 

Then, jupyter contrib nbextension install --user executes without error.

Now you can install and enable jupyter extensions (e.g. black) like this:

jupyter nbextension install https://github.com/drillan/jupyter-black/archive/master.zip --user
jupyter nbextension enable jupyter-black-master/jupyter-black
merowinger
  • 181
  • 2
  • 8
0

Downgrading the notebook version to 5.6.0 worked for me.

pip install notebook==5.6.0

If this doesn't work for you, then return to your original version.

Good luck.

Todd Burus
  • 963
  • 1
  • 6
  • 20
Treamy
  • 1
0

I followed the highest voted answer to install the nbextensions but received an error when I reboot the Jupyter Notebook:

404 GET /nbextensions/nbextensions_configurator/tree_tab/main.js?v=20220513151408

It seemed that what I've installed can not be found by Jupyter Notebook.

After checking the detailed installation log in the terminal, I found Nbextension has been installed into the python2.7 directory:

./Library/Python/2.7/lib/python/site-packages (from jupyter_contrib_nbextensions)

I am currently using Python 3 in Jupyter Notebook so I decided to uninstall what I have and reinstall Nbextension using pip3 instead of pip. Then I reboot Jupyter Notebook and saw the Nbextensions tab (next to the tab Clusters)!

In sum, based on my attempt, I would recommend using pip3 instead of pip to avoid an installation in Python 2 directory.

0

My installed package version (windows 11):

notebook                          6.5.2
jupyter-contrib-nbextensions      0.7.0
jupyter-nbextensions-configurator 0.6.1

Though I can not get the nbextensions menu tab out using the methods mentioned in the previous try outs of this post, I can still use the jupyter nbextension enable <require path> command in the ../python3/scripts folder as following examples which I use frequently:

jupyter nbextension enable varInspector/main
jupyter nbextension enable toc2/main
jupyter nbextension enable execute_time/ExecuteTime
jupyter nbextension enable hide_input/main
jupyter nbextension enable splitcell/splitcell
jupyter nbextension enable code_prettify/code_prettify

Then the variable inspector, table of contents, split cell, hide inputs and code prettify buttons appear in the notebook page. Other extensions can be tried replacing command's <require path> which can be found under the older version's notebook extensions tab that doesn't have the problem.

ocean11
  • 241
  • 2
  • 9
0

Below commands are helpful to install nbextention

pip install notebook jupyter_contrib_nbextensions jupyter contrib nbextension install --user jupyter nbextension enable varInspector/main

Impotant Note: make sure that packages jupyter , notebook and jupyter_contrib_nbextensions are installed for with same version of python and same --user flog For example: In my system python3.7 and python3.9 were both installed but when I run pip3 install notebook jupyter_contrib_nbextensions , nbextension installed in python3.9 due to this jupyter contrib nbextension install --user not working but once is used pip3.7 install notebook jupyter_contrib_nbextensions for specific python3.7 then everything working fine.

Pramod Kumar
  • 19
  • 1
  • 4
0

The only solution that worked for me is this simple line of code:

pip install jupyter_contrib_nbextensions "nbclassic<0.5"

No need to downgrade your jupyter notebook version.If you install a version of nbclassic>0.5 the nbextensions tab WILL NOT be visible when you run the jupyter server.Hope this helps you!Good luck!

0

Step 1: Execute the following commands to install and configure jupyter_contrib_nbextensions and nbextensions_configurator:

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user

If nbextensions is not displayed yet,

Step 2: Check whether the notebook version is higher than 6.1.5. If it is higher, you can use the following command to reinstall it.

pip install notebook==6.1.5

I tested this method on Mac and Ubuntu can solve the problem.

ah bon
  • 9,293
  • 12
  • 65
  • 148
0

As many of the answers say, reducing the version of your notebook is the best solution, especially if you try the myriad of anaconda-promote commands.

Here is my version now, notebook from 7.5. to 6.4.8*

enter image description here

As text for easy copying:

IPython: 8.10.0
ipykernel: 6.19.2
ipywidgets: 7.6.5
jupyter_client: 7.3.4
jupyter_core : 5.2.0
jupyter_server : 1.23.4
jupyterlab: 3.5.3
nbclient: 0.5.13
nbconvert: 6.5.4
nbformat: 5.7.0
notebook: 6.4.8
qtconsole: 5.4.0
traitlets: 5.7.1
Sysanin
  • 1,501
  • 20
  • 27
HHH A
  • 1
  • 1
-1

Change old path notebook/js/mathjaxutils to base/js/mathjaxutils.js to load the dependency correctly.

enter image description here

This solve my problem.

For details see this Github issue about this bug.

4b0
  • 21,981
  • 30
  • 95
  • 142
-1

You can install or uninstall any extension you want manually if not shown the nbextensions tab in the Jupyter Notebook server after you are ensured you have installed jupyter_contrib_nbextensions and enabled the nbextensions configurator using the following commands.

install Jupyter Notebook extensions

conda install -c conda-forge jupyter_contrib_nbextensions

enable the nbextensions configurator

jupyter nbextensions_configurator enable --user

To install extensions manually, You can use one of these following syntax

jupyter nbextensions enable/disable extension_name/extension_name

Or

jupyter nbextensions enable/disable extension_name/main

You are able to find and replace the name of your arbitrary extensions with 'extension_name' using the list of provided nbextensions

for instance, you can install or uninstall the following extensions as shown below

Toggle all line numbers

jupyter nbextension enenable/disable toggle_all_line_numbers/main

Highlighter

jupyter nbextension enable/disable highlighter/highlighter

Variable Inspector

jupyter nbextension enable/disable varInspector/main

Hinterland

jupyter nbextension enable/disable hinterland/hinterland

Note: After You got "Vaildating: ok", You have to shut down the Kernel to be able to use the installed extensions in Notebooks.

  • Although the extensions have been installed and activated and I get the validation success message. It doesn't work. With conda: 23.3.1, jupyter_client : 7.3.4 jupyter_core : 5.2.0 jupyter_server : 1.23.4 jupyterlab : 3.5.3 nbclient : 0.5.13 nbconvert : 6.5.4 nbformat : 5.7.0 notebook : 6.5.2 – Augusto Sisa May 02 '23 at 03:23
  • Downgrading to conda 22.9.0 jupyter_core : 4.11.1 jupyter_server : 1.18.1 jupyterlab : 3.4.4 nbconvert : 6.4.4 nbformat : 5.5.0 notebook : 6.4.12. NBextensions worked again. (With some warnings about `template_path`) – Augusto Sisa May 02 '23 at 05:22
  • Link doesnt work – rbonallo May 25 '23 at 10:55