Error running plotly.offline.iplot

Hi, I run the following code in notebook, and the output is “No renderer could be found for output. It has the following MIME types: application/vnd.plotly.v1+json”, I wanna know why?

import plotly.plotly
x1 = [1, 2, 3, 5, 6]
y1 = [1, 4.5, 7, 24, 38]
trace1 = dict(x=x1, y=y1)
data = [trace1]
plotly.offline.iplot(data, filename=‘s0_first_plot’)

Hi Kofch,

are you wanting to plot the graph via html? or plot it within jupyter notebook?

try putting in:

import plotly.offline as py
py.init_notebook_mode(connected=True)
x1 = [1, 2, 3, 5, 6]
y1 = [1, 4.5, 7, 24, 38]
trace1 = dict(x=x1, y=y1)
data = [trace1]
py.iplot(data,filename=“s0_first_plot”)

Regards,

Dan

Hi @kofch,

Also, make sure that the versions of things you have installed match the installation instructions (See https://github.com/plotly/plotly.py#installation) for either the classic notebook or JupyterLab.

-Jon

Hi Dan,
I want to plot it within notebook.
And I try your code, but it plot nothing but a blank sheet.

Strange it works for me, maybe check the versions of installations you have from what @jmmease wrote