Plotly gives an empty field as output in jupyter lab

前端 未结 2 2186
春和景丽
春和景丽 2021-02-07 14:11

I\'m using plotly at jupyter lab, but I\'m getting a blanked output. I\'m having exactly the same problem described here: plotly.offline.iplot gives a large blank field as its o

2条回答
  •  天涯浪人
    2021-02-07 14:21

    @YaOzI answer is partially correct but @jupyterlab/plotly-extension is deprecated and not supported by the official plotly team as you can read here.

    This can give you the following error:

    ValueError: The extension "@jupyterlab/plotly-extension" does not yet support the current version of JupyterLab.
    
    
    Conflicting Dependencies:
    JupyterLab                        Extension      Package
    >=2.2.1 <2.3.0                    >=1.3.0 <2.0.0 @jupyterlab/rendermime-interfaces
    See the log file for details:  /tmp/jupyterlab-debug-a3i3t9j4.log
    

    >>> TL;DR:

    Following the official advice, this is what worked for me (make sure your kernel is shut down, otherwise you will need to run jupyter lab build):

    jupyter labextension install jupyterlab-plotly
    

    And (just to be sure it worked):

    jupyter labextension list
    

    May give you something like this:

    JupyterLab v2.2.9
    Known labextensions:
       app dir: /home/user/anaconda3/envs/your-py-env/share/jupyter/lab
            jupyterlab-dash v0.3.0  enabled  OK
            jupyterlab-plotly v4.14.1  enabled  OK
    
    

提交回复
热议问题