TLDR: solution thread at https://stackoverflow.com/questions/58473837/plotly-missing-orca
I love plotly. I never remember any of their syntax when generating images and have to search every single time but they produce easily some of the most gorgeous graphs if you spend a few minutes, maybe hours, or days obsessing over the details and produce stunning images. I absolutely adore it for visualization.
However, Plotly has an unreliable dependency/connection with Orca. It is a PITA in the most utter, frustrating thing to work with and I struggled to solve it literally over span of months across dozens of computers and never managed to get it working… until now.
So in theory, it is easy as pie. Install, add binary to path, if not, run
plotly.io.orca.config.executable = '/path/to/orca'
and everything should work. Except, it never worked across the half dozens of computer I tried on windows. In my jupyter notebook, I can even launch !orca but for some bizarre reason, the plotly fails to find ORCA executable WHILE printing out the path in the debug prompt. The fact that I POINT it to it via command above, still fails. Impressive…
So I thought I was special and must be something with my machine/env/windows/. Then I search and saw quite a few thread that leads to no where…
- Using commandline call: https://community.plotly.com/t/unable-to-save-to-pdf-with-orca-even-though-the-package-is-visible-as-installed/29628/2
Eventually, I found the solution thread for ME at least: https://stackoverflow.com/questions/58473837/plotly-missing-orca. I need a shrine built for the user Susanna Ventafridda for finding this out.
In short, a MANUAL tweak to the Plotly package and alter the function call to WHICH will help find the package.
Not sure if this is a windows only issue or not. However, after MANUALLY updating that path to point to the orca.exe, it works for me at least… Don’t forget the r infront of the path string.
PS: Some additional annoyance I noticed right away:
- fig.write_image() does not take Path… yeah… you have to pass it string path information. I feel dirty.