Jupyter, AttributeError: type object 'Widget' has no attribute 'observe'
<p>I tried to use observe for my toggleButton </p>

<pre><code>wtarget = widgets.ToggleButtons(
    description='select target',
    options=['A', 'B', 'C', 'D', 'E', 'F'])
wtarget.observe(target_on_value_change, names='value')  
</code></pre>

<p>It displayed this error:</p>

<pre><code>AttributeError: 'ToggleButtons' object has no attribute 'observe'
</code></pre>

<p>I had no problem with another MacBook but this one showed the problem. 
I am using MacBook, 10.12. Python Version 4.0.0. ipywidgets was installed via pip. </p>

<p>Thanks.</p>

<p>This suggests that you have an old version of traitlets. <code>.observe</code> was added in traitlets 4.1:</p>

<pre><code>pip install --upgrade traitlets
</code></pre>

<p>You may want to upgrade more than that:</p>

<pre><code>pip install --upgrade ipywidgets
</code></pre>

python ipython jupyter