Plotly fig.write_image() not working

Hi,
I am trying to save an image to local using .write_image() which is giving error. Below are the two errors for two different engines.

ORCA-
ValueError:
The orca executable is required to export figures as static images,
but it could not be found on the system path.

I have already installed orca and set the config executing below command:
plotly.io.orca.config.executable = β€˜C:\Users\mchaudhary\AppData\Local\anaconda3\Lib\site-packages\orca’

KALEIDO-
ValueError:
Image export using the β€œkaleido” engine requires the kaleido package,
which can be installed using pip:
$ pip install -U kaleido

I have also installed kaleido on my system executing below command:
python -m pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org install kaleido-0.1.0.post1-py2.py3-none-win_amd64.whl

Below is my code:

fig = px.bar(dv01_exp_by_tenure_graph_data, x="level_0", y="Value", color="Asset Class",
            hover_data=['Value'], barmode = 'stack', text_auto=True)

fig.write_image("dv01_plotly.png")

Hi @manishkc06,

According to this documentation Static image export in Python , orca is for legacy dash versions. Hence, could you please delete orca.config line, restart your notebook, if you are using one, and try again… And also, please make sure that you are in the intended environment, if you use something like conda etc.