plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Jupyterlab 3: Renderer broken inside fresh env with extensions properly installed

Open bede opened this issue 4 years ago • 7 comments

Thanks for having detailed troubleshooting docs for Jupyterlab issues, however I'm unable to use the plotly_mimetype renderer (blank plot) in a fresh Jupyterlab (3.0.5) conda environment having followed the troubleshooting and getting started guides almost to the letter. The Plotly express plot works if I downgrade to an early 2.x jupyterlab version. This point in particular makes me suspicous that I have encountered an issue, perhaps related to Lab 3.x

Have I somehow missed something? Using Mac OS 10.14.6

Server

  1. conda create -n jlab-server jupyterlab nodejs ipywidgets>=7.5
  2. jupyter labextension install [email protected]
  3. jupyter labextension install @jupyter-widgets/jupyterlab-manager [email protected]
  4. jupyter lab build

Kernel conda install -c plotly plotly=4.14.3

Both jupyter labextension list and the lab UI confirm that these extensions are installed. I'm not confusing server and kernel environments.

$ jupyter labextension list
JupyterLab v3.0.5
/Users/bede/conda/envs/jlab-server/share/jupyter/labextensions
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /Users/bede/conda/envs/jlab-server/share/jupyter/lab
        jupyterlab-plotly v4.14.3 enabled OK
        plotlywidget v4.14.3 enabled OK

bede avatar Jan 28 '21 21:01 bede

I have the same problem...

https://community.plotly.com/t/jupyterlab-plotly-not-compatible-with-jupyterlab-3-0/48777/2

@nicolaskruchten

ZupoLlask avatar Jan 30 '21 11:01 ZupoLlask

Re: @nicolaskruchten's suggestion in that thread posted by @ZupoLlask , the console error accompanying this issue is Uncaught ReferenceError: require is not defined

bede avatar Jan 30 '21 17:01 bede

@bede did you end up finding a solution? I'm in the same boat, but may just downgrade Jupyterlab

TheAustinator avatar Feb 10 '21 03:02 TheAustinator

@TheAustinator I found a solution to my problem. Can you please show us the full output of jupyter labextension list?

ZupoLlask avatar Feb 10 '21 08:02 ZupoLlask

@TheAustinator Alas I did not, and have said goodbye to Plotly for the time being!

@ZupoLlask Can you elaborate?

bede avatar Feb 11 '21 15:02 bede

@ZupoLlask, it started working after I uninstalled all extensions and reinstalled the plotly extension -- I had a bunch of outdated ones, so maybe one of them was interfering. Here's my list now

JupyterLab v3.0.7
/usr/local/share/jupyter/labextensions
        jupyter-matplotlib v0.8.2 enabled OK
        jupyterlab-jupytext v1.3.0 enabled OK (python, jupytext)
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
        @ryantam626/jupyterlab_code_formatter v1.4.3 enabled OK (python, jupyterlab-code-formatter)

Other labextensions (built into JupyterLab)
   app dir: /usr/local/share/jupyter/lab
        jupyterlab-dash v0.4.0 enabled OK
        jupyterlab-plotly v4.14.3 enabled OK

@bede, maybe this will work for you?

TheAustinator avatar Feb 13 '21 00:02 TheAustinator

@TheAustinator Thanks for sharing a simple and effective solution. Below, I have copied the steps for easy implementation using your comment (applied for my case, Jupyterlab version 3.2.1 RESULTS: JupyterLab v3.2.1 labextensions @jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab) app dir: jupyter-matplotlib v0.10.2 enabled ok jupyterlab-dash v0.4.0 enabled ok jupyterlab-plotly v5.4.0 enabled ok plotlywidget v4.14.3 enabled ok

ACTIONS TO BE TAKEN $ jupyter lab clean --all $ jupyter labextension list $ jupyter labextension install plotlywidget $ jupyter labextension install jupyterlab-plotly $ jupyter labextension install jupyterlab-dash $ jupyter labextension install jupyter-matplotlib

rafmora avatar Dec 11 '21 17:12 rafmora