# Export Plotly Visuals as static

**URL:** <https://community.plotly.com/t/export-plotly-visuals-as-static/77043>\
**Category:** 📊 Plotly Python\
**Created:** [July 20, 2023, 3:07pm UTC](https://community.plotly.com/t/export-plotly-visuals-as-static/77043 "2023-07-20T15:07:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GabrielBKaram](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@GabrielBKaram](https://community.plotly.com/u/GabrielBKaram)\
**Post date:** [July 20, 2023, 3:07pm UTC](https://community.plotly.com/t/export-plotly-visuals-as-static/77043/1 "2023-07-20T15:07:45Z")

</div>

I am trying to create a plotly visual and then save it in a created images folder in my pycharm directory. I have used the same code used in the plotly website ([Static image export in Python](https://plotly.com/python/static-image-export/)) however when i run the code, it gets stuck and the image does not get saved. can someone please help? I have kaleido installed as well.

```auto
import plotly.graph_objects as go
import numpy as np
import os
np.random.seed(1)

if not os.path.exists("images"):
    os.mkdir("images")

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.write_image("images/fig1.jpeg")

```

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [July 20, 2023, 3:19pm UTC](https://community.plotly.com/t/export-plotly-visuals-as-static/77043/2 "2023-07-20T15:19:09Z")

</div>

Hey @GabrielBKaram are you using Windows?

Apparently `kaleido` has some problems when using Windows as os:

> [@Static image export hangs using kaleido](https://community.plotly.com/t/static-image-export-hangs-using-kaleido/61519):
>
> I’m following [this](https://plotly.com/python/static-image-export/) tutorial and trying to export a plot to a static image but nothing happens, the script hangs. I believe the problem is on [this](https://github.com/plotly/Kaleido/blob/89f88e612b47302a6df40566e7a4cecc0c17cdb3/repos/kaleido/py/kaleido/scopes/base.py#L192) line that never produces a value. The contents of proc\_args (computed [here](https://github.com/plotly/Kaleido/blob/89f88e612b47302a6df40566e7a4cecc0c17cdb3/repos/kaleido/py/kaleido/scopes/base.py#L176)) are: C:\Users\\<username\>\PycharmProjects\imgexport\venv\lib\site-packages\kaleido\executable\kaleido.cmd plotly --plotlyjs='C:\\Users\\\<username\>\\PycharmProjects\\imgexport\\venv\\lib\\site-packages\\plotly\\package\_data\\plotly.min.js' --mathjax='file:///C:/Users/\<username\>…

---

<div class="post-metadata">

**Author:** ![GabrielBKaram](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@GabrielBKaram](https://community.plotly.com/u/GabrielBKaram)\
**Post date:** [July 20, 2023, 3:35pm UTC](https://community.plotly.com/t/export-plotly-visuals-as-static/77043/3 "2023-07-20T15:35:25Z")

</div>

Hey @AIMPED ,

I followed the link and I downloaded the same whl file for kaleidoscope. i then went on pycharm and wrote “pip install kaleido-0.1.0.post1-py2.py3-none-win\_amd64.whl” however it is not finding the downloaded file. i even moved the downloaded whl file to the same directory. Do you know what i could be doing wrong?

Thanks !
