Im trying to export images from plotly and it’s just not working! I’m using Anaconda and installed a new enviroment with just plotly and python-kaleido installed. No chance! In the jupyter notebook there is the * sign for “running” but nothing happens. No error message … What should I do?
For large plots, if WebGL isn’t enabled, kaleido can take a very long time to render an image, since it doesn’t use the graphics card.
Look up rendering with webgl in the documentation; if you can’t find what you’re looking for ask me again and I can give you more precise direction.
I’m trying to run the simple example from the plotly homepage. This should work in seconds, minutes or hours? After two hours I gave up. Is that the very long time you mean???
import plotly.graph_objects as go import numpy as np np.random.seed(1) N = 100 x = np.random.rand(N) y = np.random.rand(N) colors = np.random.rand(N) sz = np.random.rand(N) * 30 fig = go.Figure() fig.add_trace(go.Scatter( x=x, y=y, mode="markers", marker=go.scatter.Marker( size=sz, color=colors, opacity=0.6, colorscale="Viridis" ) )) fig.show() fig.write_image("test.png")
Google Chrome says:
Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Enabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Hardware accelerated
Yes, even before using webgl, that script runs for me in less than a second. How much memory are you giving your environment? Also, if it’s an issue with Anaconda, I’m sorry I don’t have experience there.
Are you using a windows OS?
Yes, I have to use Windows as OS.
I’m sorry for your experience, @LPG . We’ve been having issues with kaleido and windows unfortunately.
Will it be solved in the near future or is it possible to use the orca packege like in former plotly versions?
orca still works, so it would be best that you use that. As soon as we have the resources to update kaleido, we’ll let you know.
To my knowledge,
0.1.0post1 remains the only version of
kaleido that will output figures on Windows: Image generation hangs on windows 10 · Issue #110 · plotly/Kaleido · GitHub
I’ve been stably outputting figures keeping my
kaleido version pinned to this for over a year.
I’m still using plotly 5.14.1 . Then I uninstalled kaleido and installed the orca (1.8) and plotly-orca (4.1.4). Now everything works like it should again!
Thanks for all the support!