Jupyterlab uses plotly pictures not to display the solution

question

Anaconda installed the plotly library, entered the lab to draw, and found that it was blank no matter what, and the picture could not be displayed.

Solution

This is because no plugins for rendering support are installed.
Enter at the command line:

#首先需要安装nodejs12.0.0以上版本
conda install nodejs
#接下来安装渲染插件
jupyter labextension install [email protected]

Run the sample code:

import plotly.graph_objects as go
fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
fig.show()

insert image description here
The picture can be drawn normally.

Guess you like

Origin blog.csdn.net/weixin_43945848/article/details/116983135