Interactive HTML widgets for Jupyter notebooks and the IPython kernel.
A demonstration notebook provides an overview of the interactive widgets. For detailed information, please refer to the ipywidgets documentation.
Install the current version of ipywidgets using pip or conda:
pip install ipywidgets
or
conda install ipywidgets
If you're interested in only installing the JavaScript, you may do so by running
npm install jupyter-js-widgets
To install ipywidgets from git, you will need npm.
-
clone the repo:
git clone https://github.com/ipython/ipywidgets cd ipywidgets
-
Dev-install of the package (run from repo directory):
pip install -v -e .
-
Install the Jupyter Widgets nbextension
cd widgetsnbextension pip install -v -e .
Note: You need to have npm installed. The installation process will complain if you don't. If you install using sudo, you need to make sure that npm is also available in the PATH used with sudo.
To run the Python tests:
nosetests --with-coverage --cover-package=ipywidgets ipywidgets
To run the Javascript tests:
cd jupyter-js-widgets; npm run test
This will run the test suite using karma
with 'debug' level logging.