【发布时间】:2021-06-04 17:50:24
【问题描述】:
我正在运行 JupyterLab 3.0.6 和 Plotly 4.14.1。似乎所有的情节破折号插件都过时了?是否有任何适用于 JupyterLab 3 的扩展?
例如
import plotly.express as px
px.line([1,2,3,2])
只显示空输出。
【问题讨论】:
标签: plotly jupyter-lab
我正在运行 JupyterLab 3.0.6 和 Plotly 4.14.1。似乎所有的情节破折号插件都过时了?是否有任何适用于 JupyterLab 3 的扩展?
例如
import plotly.express as px
px.line([1,2,3,2])
只显示空输出。
【问题讨论】:
标签: plotly jupyter-lab
这个问题已经被一位情节开发者回答了。
Plotly express is not rendered in jupyter lab
编辑:该链接是旧的对不起。经过更多研究,看来 jupyter lab 3 目前与 plotly 不兼容。他们目前正在努力。
https://community.plotly.com/t/jupyterlab-plotly-not-compatible-with-jupyterlab-3-0/48777
【讨论】:
plotly v5 开始得到更好的支持,并带有联合扩展 :)
它现在正在工作。
conda install -c plotly plotly=4.14.3
conda install "notebook>=5.3" "ipywidgets>=7.5"
jupyter labextension install jupyterlab-plotly@4.14.3
# OPTIONAL: Jupyter widgets extension
jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.14.3
【讨论】:
labextension 命令“用于 JupyterLab 2 或更早版本。”
要在 ubuntu 上的 JupyterLab 3 上安装 Plotly 需要安装 nodejs、npm 和 jupyterlab plotly 扩展
instructions on the plotly 网站对我不起作用。该图被渲染为一个白色方块。我发现 jupyterlab plotly 扩展正在工作,但在 Ubuntu 上它依赖于 nodejs 和 npm。
apt install nodejs npm
jupyter labextension install jupyterlab-plotly
重新启动 jupyter,它应该像下面的示例一样工作。
【讨论】:
plotly 的 5.x 版本中已经过时了
正如评论中提到的 How to show Plotly figures in JupyterLab 3+? 使用 JupyterLab 3.x 和 Plotly 5.x labextension 安装 plotly 已过时。
【讨论】: