2

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"

1 Answer 1

3

These objects have moved with some renaming:

from ipywidgets import interact, Button
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.