Cannot find orca executable in Jupyter Notebook

Hi, I am trying to generate a PDF image from plotly expres, with the following code:

import pandas as pd
import plotly.express as px

data = pd.read_csv(‘data.csv’)
fig = px.scatter(data,x=‘column1’,y=‘colum2’,
facet_col=‘epsilon’,facet_row=‘dataset’,color=‘size’)

fig.write_image(“tables.pdf”)

When I run the code in a Jupyter notebook, i get the error, that the executable is not a valid orca executable:
The orca executable is required in order to export figures as static images,
but the executable that was found at ‘/usr/bin/orca’
does not seem to be a valid plotly orca executable. Please refer to the end of
this message for details on what went wrong.

If you haven’t installed orca yet, you can do so using conda as follows:

$ conda install -c plotly plotly-orca

Alternatively, see other installation methods in the orca project README at

After installation is complete, no further configuration should be needed.

If you have installed orca, then for some reason plotly.py was unable to
locate it. In this case, set the plotly.io.orca.config.executable
property to the full path of your orca executable. For example:

>>> plotly.io.orca.config.executable = '/path/to/orca'

However, if I run the code in a python script, outside a notebook, it works. Do you know why? Or how can I execute all from a notebook?

I use conda in Ubuntu.

Thanks!