One of the features that I miss while using Jupyter notebooks in dataiku is that the cells are not collapsible.
It just helps in better readability to collapse some cells when the notebook grows too big.
The same can be enabled using python's jupyter_contrib_nbextensions package.
My question is
1. Will installing this break any core jupyter dependencies of DSS?
2. If No, Please provide clear instructions on how an admin can enable the same for all DSS Users as a global setting.
Let me know if you require any more details
Unfortunately, installing nbextensions is currently not supported in DSS. With that being said, we appreciate the feedback and I'd be happy to forward this feedback/use case to our product team on your behalf for further review and consideration.
I've been working on this today. I got "widgets" installed. I can get widgets up and running.
import ipywidgets ipywidgets.IntSlider()
The above produces a nice slider.
However, I'm looking to get jupyter_contrib_nbextensions package installed. This still seems to be defeating me. Now that we can get widgets installed are there any more detailed instructions on Note Book Extentsions?
Following onto this. The docs aren't super clear here: https://doc.dataiku.com/dss/latest/notebooks/jupyter-nbextensions.html?highlight=extension
I'm assuming we pip install like we typically would but for the dss base environment? Any gotchas we should be aware of? Given that this is wrapped with dssadmin i'm hesitant to move forward. We'd love to have more capability in nbs. @CoreyS
The pip installing I did was typical for dss ritual env not pip in general. Typically I work with one of several code environments in DSS. Pip install is typically best managed by DSS. This is done on the Admin / Code Environment screen.
here is a bit of a tutorial from the academy.
I've installed nbextensions on a Macintosh with these instructions on DSS 9.0.3 and 9.0.4. I make no guarantee that these instruction will work for you. Backup before starting. Only use these instructions if you understand what the step are doing.
At the terminal:
JUPYTER_CONFIG_DIR="$DATADIR/jupyter-run/jupyter" JUPYTER_DATA_DIR="$DATADIR/jupyter-run/jupyter" PYTHONPATH="$INSTALLDIR/dku-jupyter/packages/" ./bin/python -m notebook.nbextensions install --py widgetsnbextension --user
JUPYTER_CONFIG_DIR="$DATADIR/jupyter-run/jupyter" JUPYTER_DATA_DIR="$DATADIR/jupyter-run/jupyter" PYTHONPATH="$INSTALLDIR/dku-jupyter/packages/" ./bin/python -m notebook.nbextensions enable --py widgetsnbextension
JUPYTER_CONFIG_DIR="$DATADIR/jupyter-run/jupyter" JUPYTER_DATA_DIR="$DATADIR/jupyter-run/jupyter" PYTHONPATH="$INSTALLDIR/dku-jupyter/packages/" ./bin/python -m notebook.nbextensions list
Edit the site environment file. For example
add the following at the end of the file if it does not already exist there.
Install and check the widget extension.
$DATADIR/bin/dssadmin jupyter-nbextensions enable jupyter-js-widgets/extension
$DATADIR/bin/dssadmin jupyter-nbextensions list
The list of extensions enabled should include
Find your code environment make sure that the following library is installed:
Open you notebook
Make sure that the code environment with the library ipywidgets is being loaded as the kernel.
Reload the browser window <COMAND><SHIFT>R
Trust the Code Environment in Jupyter Notebooks.
At this point, you should have a widget menu
Add your code to a cell for example.
And you should get both Jupyter Notebook Extensions and Widgets
I don't think that this is yet reproducible Science. However, maybe it's Art?
P.S. This is also working with the extension hinterland. For which I need to install the ipython>=5.5,<5.6 in your code environment.
P.P.S. If any of you try this please let us know about your successes and failures.
Hi @importthepandas ,
Please note that if you had installed https://doc.dataiku.com/dss/latest/python/ipywidgets.html#using-jupyter-widgets before doing the upgrade to higher DSS version(all versions up until 9.0.5), then you would run into issues(as seen in your screenshot). This is a known bug and we'll be shipping a fix for it in an upcoming release of DSS (9.0.5).
In the meantime, the workaround would be to copy the contents from
If you still run into issues after doing this, then please log a support ticket and please attach a diagnostic of the DSS instance (Administration > Maintenance > Diagnostic tool) and send us the resulting file. Note that you need to be administrator of the DSS instance - else you'll need to ask your admin. If the resulting file is too large for mail (> 15 MB), you can use https://dl.dataiku.com to send it to us. Please don't forget to send the link that is generated when you upload the file.