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

Cannot show the figure in jupyterlab

Open wangfan860 opened this issue 5 years ago • 5 comments

I have a similar issue like https://github.com/plotly/plotly.py/issues/2505

Plotly renders a blank field in jupyterlab. I have matched version of python Plotly and jupyterlab-plotly, but I still can't see the figure. Any ideas? thanks so much! image

wangfan860 avatar Nov 20 '20 01:11 wangfan860

I've just added a bunch of extra info in https://plotly.com/python/troubleshooting/ so if you could take another look there to see if there's a fix for your situation, that would be great!

Specifically, it's possible that your kernel's environment has the extension installed but not your actual running JupyterLab instance, so you may want to check that the extension is installed via the JupyterLab UI itself: https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#using-the-extension-manager

nicolaskruchten avatar Nov 20 '20 17:11 nicolaskruchten

I'm using jupyterlab 2.2.9 and plotly 4.12 and it is working fine, try to update jupyterlab and plotly:

pip install --upgrade jupyterlab
pip install --upgrade plotly

leo-smi avatar Nov 22 '20 01:11 leo-smi

If that doesn't solve your problem use this...

import plotly.offline as iplot import plotly as py py.offline.init_notebook_mode(connected = True)

it will show I think this will definitely solve your problem...

brainlescoder avatar Dec 04 '20 16:12 brainlescoder

Thanks for your suggestions @brainlescoder 😊However, it doesn't work still. I'm using: import plotly.graph_objects as go and import plotly.express as px, any modifications needed for go and px?

wangfan860 avatar Dec 04 '20 17:12 wangfan860

Has anyone found a way to solve this issue?

Tried reinstalling the lab extensions and rebuilding jupyter lab but haven't managed to solve the issue.

Firefox_Screenshot_2021-04-23T15-38-31 635Z

gabegm avatar Apr 23 '21 15:04 gabegm