Cannot import ipywidgets into Slicer kernel in Jupyter Notebook

Operating system: windows10
Slicer version: Slicer 4.11.0-2020-06-09
Expected behavior: importation of ipywidgets module
Actual behavior: ModuleNotFoundError

I have opened the Jupyter Notebook from my virtual environment, where the ipywidgets module (as the rest of the modules) has been installed.
Unlike in a python kernel (where I can use ipywidgets), it seems to be not available in the Slicer kernel.

When I was installing the Slicer kernel, I followed and double-checked with whether I missed anything for ipywidgets installation.

Should I install something in a different place other than my virtual environment?

You need to install ipywidgets in both 3D Slicer’s Python console and in the external Python environment.

1 Like

Yes, now it works!

Thanks a lot

1 Like