ipywidgets: interactive Jupyter computing

25 views
Skip to first unread message

Jay Wang

unread,
Oct 10, 2017, 11:50:08 AM10/10/17
to com...@googlegroups.com
We will be using interactive widgets with sliders, buttons etc.
First install and enable ipywidgets with these terminal commands:
  • On Anaconda:
    conda install -c conda-forge ipywidget
  • On DIY install (path=your scripts path)
    • /path/pip install ipywidgets
      /path/jupyter nbextension enable --py --sys-prefix widgetsnbextension
  • On the remote Jupyter server:
    • pip3 install ipywidgets
      jupyter nbextension enable
      --py widgetsnbextension
Once installed and enabled, test with the following in Jupyter
from ipywidgets import interactive
def prtx(x):
   
print (x)
interactive
(prtx, x=(0,1,.01))
More examples at http://www.faculty.umassd.edu/j.wang/p521/
Reply all
Reply to author
Forward
0 new messages