Opened 7 years ago

Last modified 7 years ago

#54534 assigned defect

py-widgetsnbextension: how to enable?

Reported by: cdeil (Christoph Deil) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-widgetsnbextension

Description

I'm using Macports to install Python / IPython / Jupyter and would like to enable and use the Jupyter widgets from the Jupyter notebook.

With the default macports installation they are not enabled, which means that if you try to use them in the Jupyter notebook one gets this error:

>>> import ipywidgets as widgets
>>> widgets.IntSlider()
Widget Javascript not detected.  It may not be installed or enabled properly.

As explained at http://ipywidgets.readthedocs.io/en/latest/user_install.html one has to enable them like this:

jupyter nbextension enable --py widgetsnbextension

However, this doesn't work with the Macports install, that command tries to write to here:

PermissionError: [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/3.6/etc'

My understanding is that one should never use sudo and let other commands than port muck with the files in /opt/local.

  • What is a good way for Macports users to enable these extensions?
  • Is there a wiki page or any other place with this information?
  • Wouldn't it make sense that you always enable them at install time?

I also have another third-party Jupyter widgets that are not packaged in Macports (https://github.com/cds-astro/ipyaladin) that I installed via pip install --user and would like to enable now. Same question: how to I enable it? Should I use sudo and write to /opt/local or is there a better way?

One last thing - I wasn't sure whether to file this issue for py-ipywidgets or py-widgetsnbextension, from the port descriptions it's not clear to me what the difference between the two is.

Change History (1)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: stromnov@… removed
Owner: set to stromnov
Status: newassigned
Note: See TracTickets for help on using tickets.