Search code examples
pythonplotipythonenthoughtcanopy

Error importing html.widgets of iPython in Canopy


I am trying to run the following code from here:

from IPython.html.widgets import interact, interactive

And it gives me the following error:

----> 1 from IPython.html.widgets import  interactive


ImportError: No module named widgets 

And I am using Canopy as IDE. Do I need to install an extra package to get this widgets?


Solution

  • Thanks for using Canopy. IPython.html.widgets have been added in the 1.2.0 which was just out. Canopy will offer the update as soon as we will have a chance to test that the new version will work smoothly for you. It is likely to be available by mid-march. If you need to have it now, you can do the following:

    1. Check out the project from github: git clone git@github.com:ipython/ipython.git
    2. Grab the 1.2.0 release branch with git checkout rel-1.2.0
    3. run python setup.py develop using your Canopy python executable.
    4. Start the notebook from the terminal as opposed to the notebook inside Canopy so that your bleeding edge version is being used.