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

InvocationException: GraphViz's executables not found in examples/uplift_tree_visualization.ipynb #651

Closed
ras44 opened this issue Jul 27, 2023 · 3 comments · Fixed by #661
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ras44
Copy link
Collaborator

ras44 commented Jul 27, 2023

Describe the bug
Running https://github.com/uber/causalml/blob/master/examples/uplift_tree_visualization.ipynb leads to an error:

InvocationException: GraphViz's executables not found

To Reproduce
Run http://34.171.211.97:8888/doc/tree/examples/uplift_tree_visualization.ipynb

Expected behavior
No error

Screenshots
image

Environment (please complete the following information):

  • OS: [Ubuntu]
  • Python Version: [3.8]

Additional context
This looks like a missing dependency on graphviz

@ras44 ras44 added the bug Something isn't working label Jul 27, 2023
@vincewu51 vincewu51 self-assigned this Aug 19, 2023
@vincewu51 vincewu51 added the help wanted Extra attention is needed label Aug 19, 2023
@vincewu51
Copy link
Collaborator

graphviz has a recurring issue with the env variable issue. It seems to require manual installation for it to work Link
Should we seek alternatives?
@jeongyoonlee @paullo0106 @ppstacy

ras44 pushed a commit to ras44/causalml that referenced this issue Aug 22, 2023
@ras44
Copy link
Collaborator Author

ras44 commented Aug 22, 2023

@vincewu51 @jeongyoonlee On a clean instance, for me, I was able to resolve with two steps:

conda install python-graphviz

after which there appears to be an issue with libxrender. When I check the ldd dependency resolution, libxrender is not installed:

image

After installing it with sudo apt-get install -y libxrender-dev, I see beautiful tree plots!

image

Since libxrender can also be installed through conda, and since we've previously tried to avoid installing system libs manually via apt-get, it appears the solution is:

conda install python-graphviz
conda config --add channels conda-forge
conda install xorg-libxrender

I'd be happy to include a PR that incorporates the fix.

@vincewu51
Copy link
Collaborator

vincewu51 commented Aug 22, 2023 via email

ras44 pushed a commit to ras44/causalml that referenced this issue Aug 22, 2023
ras44 pushed a commit to ras44/causalml that referenced this issue Aug 22, 2023
@vincewu51 vincewu51 linked a pull request Aug 22, 2023 that will close this issue
10 tasks
vincewu51 added a commit that referenced this issue Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants