Search code examples
pythonmacosjupyter-notebookipywidgets

How to solve or debug that IPyWidgets are just partially shown?


I have just installed Jupyter Notebooks and a new Python environment using venv on my vanilla Macbook (I have not used Jupyter on this hardware before). Now I am running the Jupyter Notebook, that is using IPyWidgets as input controls, and recognized that only some of the widgets are shown.

A minimal example, which reproduces the behaviour on my machine:

import ipywidgets
display(
    ipywidgets.Combobox(description='test1'), 
    ipywidgets.Checkbox(description='test2'), 
    ipywidgets.Button(description='test3')
)

This is what the output looks on my machine:

enter image description here

And this is what it's supposed to look like (taken on another machine):

enter image description here

As you can see, on my machine only the button is displayed (which also means that ipywidgets is essentially working). As no error is shown, I do not have any clue where to start debugging this nor how to solve it and would appreciate advice on how to continue from here.

I have already tried different browsers (namely Chrome & Safari) without any effect on the output.


Solution

  • So, I initially installed Jupyter on the main environment and then created a virtual environment using venv. Obviously this has caused issues since the problem is gone after installing Jupyter into the same venv.