Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Colab: Orca - Plotly xvfb property set to True, but the xvfb-run executable could not be found on the system path. #384

Open
MarkKrickovich opened this issue Dec 30, 2021 · 0 comments

Comments

@MarkKrickovich
Copy link

MarkKrickovich commented Dec 30, 2021

I am receiving a Path Error using Orca in Google Colab to save an image in a Google Colab .ipynb Python Machine Learning model. A Flask App (written in VS Code IDE) uses the Colab trained model to output results to a URL. To be clear, the errors occur in my Colab Python script. This error is very similar to issue #252, however, I am unable to recreate the solution used there.

I Colab, I have created the following recommended import lines, as described in many posts:

!pip install plotly>=4.7.1 !wget https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O /usr/local/bin/orca !chmod +x /usr/local/bin/orca
and
import plotly.graph_objects as go

I then use the following image write command:
fig.write_image('base_pic.svg')
I expect to see 'base_pic.svg' appear as a file when the code runs, but this is not happening.

My error seems to related to a path setting, however, I am unable to find detailed instruction to update and correct this path. Unfortunately, I am quite novice with troubleshooting paths.
The Error:

ValueError Traceback (most recent call last)
in ()
1 #TEST FUNCTION
----> 2 make_picture('AgesAndHeights.pkl',model, floats_string_to_np_array('1, 3, 3.2, '),'x.svg')
5 frames
/usr/local/lib/python3.7/dist-packages/plotly/io/_orca.py in validate_executable()
1109 Searched for the executable 'xvfb-run' on the following path:
1110 {formatted_path}""".format(
-> 1111 formatted_path=formatted_path
1112 )
1113 )

ValueError:
The plotly.io.orca.config.use_xvfb property is set to True, but the
xvfb-run executable could not be found on the system path.
Searched for the executable 'xvfb-run' on the following path:
/usr/local/nvidia/bin
/usr/local/cuda/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin

My SetUp:
Windows 10
VS Code to run a Flask app
Google Colab to host the ML model
Python 3.9.7 used via Anaconda

I have noted several discussions where users recommend using Kaleido instead of Orca, and I am using Kaleido within the Flask app, however, I do not believe Colab supports Kaleido. Is this correct?

Any help would be welcomed.
Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant