'No such comm target registered error in ipython

When I start a python3 notebook in conda environment, I got such an error in terminal:

[I 21:59:46.185 NotebookApp] Creating new notebook in /Untitled Folder
[I 21:59:47.071 NotebookApp] Kernel started: a8c53aaf-8282-479d-b3ec-afb9433c30e6
[IPKernelApp] ERROR | No such comm target registered: ipython.widget

But if I start python2 instead, this error disappears. Do you know how I can deal with this problem?



Solution 1:[1]

Perhaps all requirements are satisfied in your python2 e?vironment but not in your python3 environment.

On my system I could make the error disappear by doing

conda install ipywidgets

and

conda install widgetsnbextension

On a non-Anaconda distribution, probably the same can be achieved by doing a

pip3 install ipywidgets

and

pip3 install widgetsnbextension

You may have to enable the extension using

jupyter nbextension enable --py widgetsnbextension

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Chipmuenk