Frage

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?

War es hilfreich?

Lösung

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.

Andere Tipps

The version of IPython available from within Canopy's Python pane is currently hard set to 1.2.1 as of Canopy 1.4.1. However, users can update their IPython package to version 2.1.0 for use at the command line. Updating and launching IPython/Python from the command line (with Canopy set as the default, or from the Canopy Tools Menu > Canopy Command Prompt / Terminal) should give you access to IPython.html.widgets.

Please see this article for more information: https://support.enthought.com/entries/22305234-IPython-Installed-version-in-the-Package-Manager-is-not-being-used-in-the-Canopy-GUI

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top