diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index c9b0e876a..0d4aadf36 100644 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -240,15 +240,15 @@ class NotebookWebApplication(web.Application): # BEGIN HARDCODED WIDGETS HACK try: - import ipywidgets + widgets = __import__('jupyter-js-widgets-nbextension') handlers.append( (r"/nbextensions/widgets/(.*)", FileFindHandler, { - 'path': ipywidgets.find_static_assets(), + 'path': widgets.find_static_assets(), 'no_cache_paths': ['/'], # don't cache anything in nbextensions }), ) except: - app_log.warning('ipywidgets package not installed. Widgets are unavailable.') + app_log.warning('jupyter-js-widgets-nbextension package not installed. Widgets are unavailable.') # END HARDCODED WIDGETS HACK handlers.append( diff --git a/notebook/static/notebook/js/main.js b/notebook/static/notebook/js/main.js index 4f5cbce6b..d9caa332d 100644 --- a/notebook/static/notebook/js/main.js +++ b/notebook/static/notebook/js/main.js @@ -55,7 +55,7 @@ require([ "use strict"; // BEGIN HARDCODED WIDGETS HACK - utils.load_extension('widgets/notebook/js/extension').catch(function () { + utils.load_extension('widgets/extension').catch(function () { console.warn('ipywidgets package not installed. Widgets are not available.'); }); // END HARDCODED WIDGETS HACK