orca: Why plotly-orca is unable to install via pip?

I just want to know, why is that plotly-orca not available in PyPi.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 34
  • Comments: 27 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Good news! Orca is no longer really the recommended way to do static image export with Plotly 😃

We have a new, pip-installable tool called Kaleido which is superior to Orca in every way, please check it out: https://medium.com/plotly/introducing-kaleido-b03c4b7b1d81

it would be nice if some standard method of installation for platform dependent components like rpm/deb packages was supported.

context: I want to save an image to disk, which I expect to be simple.

Current install methods are giving me problems: 1- currently using pip to manage dependencies not conda, not planning to learn conda, not planning to move the entire project to conda to save an image 2- npm is not working 3- appimage is bizar, I don’t intent to have a sub dependency of a library in a docker container to load kernel modules in order for me to save an image to disk. The work around is unclear and too much work to get an image from the screen to the disk.

if anyone finds a way to include orca in a Heroku/Google App Engine/AWS Beanstalk with dash/flask as webservers, please share. As it can’t be installed through pip (using requirements.txt) I couldn’t find a way to use it on those engines

Running npm install -g electron@1.8.4 --unsafe-perm=true --allow-root can solve the problem.

Orca is a platform dependent command line executable (not a Python shared library like numpy for example) and when we were focused on packaging it we weren’t able to find a clear approach to distribute this kind of executable using pip.

Orca is somewhat like graphviz (the executable, not the python wrapper) or git, both of which are distributed as conda packages but not as pip packages (as far as I know at least).

That said, if anyone has advice or examples of distributing platform specific command line applications using PyPI, we’re definitely open to it!

@meysampg’s suggestion:

Running npm install -g electron@1.8.4 --unsafe-perm=true --allow-root can solve the problem.

I slightly changed it to

sudo npm install -g electron@6.1.4 orca --unsafe-perm=true -allow-root

Which installed orca to usr/bin/orca but still failed in python:

ValueError: 
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
https://github.com/plotly/orca
...

Ubuntu installation without conda / npm

  1. Download the .AppImage with wget from Orca’s release page. At the time of writing it was: wget https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage
  2. Follow the Linux install instructions. make sure you follow the Linux troubleshooting guides as well (both) - it wasn’t easy.

Yeah, pip install -U kaleido it works for me . Thanks a lot

Thank you @DannyDannyDanny. It was very useful !

Hi @arifroni, I haven’t tried it recently, but in the past I’ve had luck using the png renderer in Spyder. See https://plotly.com/python/renderers/#static-image-renderers

import plotly.io as pio
pio.renderers.default = "png"
# Make a figure name fig
fig.show()

This will of course produce non-interactive figure. To launch an interactive figure in a local web browser tab, you can use the 'browser' renderer (which doesn’t use orca or kaleido). See “browser” section under https://plotly.com/python/renderers/#static-image-renderers.

import plotly.io as pio
pio.renderers.default = "browser"
# Make a figure name fig
fig.show()

Hope that helps!

it works exactly as I wanted. thanks a lot 😃