Reputation: 146
I am using Jupyter to run my code.
from Ipython.html.widgets import interact, ButtonWidget
from IPython.display import display, clear_output
I am not getting the following error for that:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-6-3fa9b991f293> in <module>()
----> 1 from IPython.html.widgets import interact, ButtonWidget
2 from IPython.display import display, clear_output
ModuleNotFoundError: No module named 'widgets'
I tried to replace IPython.html.widgets
to ipywidgets
and execute it. It threw me back:
from ipywidgets import interact, ButtonWidget
ImportError: cannot import name ButtonWidget"
Upvotes: 2
Views: 2962
Reputation: 85432
These objects have moved with some renaming:
from ipywidgets import interact, Button
Upvotes: 3