plotly / orca

Command line application for generating static images of interactive plotly charts
MIT License
293 stars 40 forks source link

Unable to install on Heroku with Pip or npm #314

Open mgug01 opened 4 years ago

mgug01 commented 4 years ago

This is related to issue #194- Plotly-orca works flawlessly on my local machine, but unfortunately after following every thread I can find on getting this up on a server like Heroku- I'm unable to get this working.

So far I've successfully installed electron & Orca within Heroku, I've installed dependencies through a APT buildpack and Aptfile but still continually receive the following error in Django:

The orca executable is required in order to export figures as static images, but the executable that was found at '/app/node_modules/.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.

I would definitely prefer to continue using Plotly if possible, though without the ability to export an image, I may unfortunately need to look elsewhere.

abitrolly commented 4 years ago

It should be possible to pack orca into Python wheel as data file - https://setuptools.readthedocs.io/en/latest/setuptools.html#including-data-files

If orca could be compiled into a static binary, that would be the easiest way.

antoinerg commented 4 years ago

If orca could be compiled into a static binary, that would be the easiest way.

@abitrolly this is something we are looking into to make it easy to install Orca anywhere via pip. Stay tuned!

antoinerg commented 4 years ago

@gugmi01 about heroku, one will need all the dependencies required to run chromium browser AND xvfb to run things in a headless manner (see http://elementalselenium.com/tips/38-headless). Usually this is done with xvfb-run -a orca graph ....

I hope this helps!

abitrolly commented 4 years ago

@antoinerg Chrome has the --headless option that doesn't need xvfb https://developers.google.com/web/updates/2017/04/headless-chrome#screenshots