Is there any way I could manually download the source for plotly widget to install it so the extension will work? Long story short, I run into permission errors (only allowed to use conda and pip install for approved packages, later versions I have to python setup.py install from source) so when I do ‘jupyter nbextension install plotlywidget’ or some variant thereof I run into problems.
Yeah, it looks like a problem with the extension installation. Unlike the classic notebook, the installation of JupyterLab extensions requires access to the public npm repository (https://www.npmjs.com/), even when installing the extensions from source.
Also, to get plotlywidget to work, you need a working install of the @jupyter-widgets/jupyterlab-manager extension (this extension supports the built-in ipywidgets).
If you don’t have npm access, you’ll need to look into offline installation of JupyterLab extensions. This is not a very smooth process at the moment, here’s the best info I know of right now https://github.com/jupyterlab/jupyterlab/issues/4494.
Though it doesn’t help you today, we do have plans to build and release a conda package that will bundle all of the plotly related JupyterLab extensions. It sounds like that would be helpful in your situation, so keep an eye out for that
Hi @jmmease! Thanks for the quick and detailed response. As a follow up, are you saying that to get this to work for Jupyter Notebook, I also have to have a working installation of the Jupyter Lab extension? I’m currently not using Lab and just trying to get it to display for Notebook. I’ll take a look at that link and post updates if I can get it to work.
Sorry for not responding quickly. The good news is that I managed to get FigureWidget to work and display properly! What I ended up doing was doing a fresh environment for Python 3.7 with the default packages from Anaconda3 on a separate laptop. I then only needed to conda install plotly and then everything worked on that laptop when using Jupyter Notebook. I packaged up the environment and did an offline installation on my other computer which allowed me to have an environment with a working FigureWidget functionality. Although I have not yet fully investigated why it was so hard to get FigureWidget to originally work on my main computer, I think it might be a result of using both conda and pip to install packages which like you said, shouldn’t be done.