I have updated plotly to 3.10.0 in order to try producing static plots as suggested here.
Something broke and I have installed Anaconda anew.
I then installed plotly following the instructions on the github page.
I have also run:
conda install -c plotly plotly-orca psutil
However, I still did not manage to make it work. Trying
import plotly.io as pio
pio.renderers.default = 'png'
fig = go.FigureWidget()
pio.show(fig)
runs into:
ValueError:
The orca executable is required in order to export figures as static images,
but the executable that was found at '/opt/anaconda3/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
https://github.com/plotly/orca.
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'
After updating this executable property, try the export operation again.
If it is successful then you may want to save this configuration so that it
will be applied automatically in future sessions. You can do this as follows:
>>> plotly.io.orca.config.save()
If you're still having trouble, feel free to ask for help on the forums at
https://community.plot.ly/c/api/python
Here is the error that was returned by the command
$ /opt/anaconda3/bin/orca --help
[Return code: 127]
/opt/anaconda3/lib/orca_app/orca: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
I get the same error when I try to run the example in the question.
I use Ubuntu 18.04.
Hi @sursu ,
it sounds like your ubuntu install is missing the libgconf library that is needed by electron (on which orca is based).
Here's how to install lib gconf on your machine
$ sudo apt install libgconf2-4
Are you using a full Ubuntu install or a headless server install? I ask because I would have expected this to be installed by default on a standard Ubuntu desktop installation.
Yes, I use a full Ubuntu install.
It used to work. It did work on April 13 when I've asked the question there.
I experienced some issues after an uninspired deletion of the .local folder. Possibly this has caused also this libgconf missing issue.
I have installed libgconf using your command and everything works fine now :)
Thank you.
Most helpful comment
Hi @sursu ,
it sounds like your ubuntu install is missing the libgconf library that is needed by electron (on which orca is based).
Here's how to install lib gconf on your machine
Are you using a full Ubuntu install or a headless server install? I ask because I would have expected this to be installed by default on a standard Ubuntu desktop installation.