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

Warning: No loadimage plugin for "svg:cairo" #4

Closed
tdgunes opened this issue Sep 27, 2018 · 20 comments
Closed

Warning: No loadimage plugin for "svg:cairo" #4

tdgunes opened this issue Sep 27, 2018 · 20 comments
Milestone

Comments

@tdgunes
Copy link

tdgunes commented Sep 27, 2018

Hello there,

I am trying to plot iris dataset in Ubuntu 18.04 bionic, with graphviz package installed. However I am getting svg:cairo warnings and there only arrows with empty boxes. The warnings that I am getting:

Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"
Warning: No loadimage plugin for "svg:cairo"

The figure looks like this:
2018-09-27-143948_4680x1920_scrot

@parrt
Copy link
Owner

parrt commented Sep 27, 2018

howdy! yes,This is exactly the problem I ran into on the Macintosh. apparently being able to generate SVG is not the same thing as being able to read the men. And I use matplotlib to generate the individual nodes and then read them in using graphviz. On the Mac I had to explicitly install graphviz with librsvg:

brew install graphviz --with-librsvg --with-app --with-pango

hopefully there is something similar on Ubuntu.

If you get this working, please report back so I can close this and also give me instructions so I can help others. Thanks!

@tdgunes
Copy link
Author

tdgunes commented Sep 27, 2018

I tried installing many combinations packages (including librsvg) but I guess there is an issue with Ubuntu's graphviz package. Someone reported this issue for a similar problem here. I guess the only way to solve this issue is to compile graphviz from scratch in Debian platforms for now.

@parrt
Copy link
Owner

parrt commented Sep 28, 2018

Can you check out this thread on twitter? somebody is trying to install on Windows / ubuntu.

@parrt
Copy link
Owner

parrt commented Sep 28, 2018

Just found this for different tool. "On Ubuntu Linux you'd do: $ sudo apt-get install python-dev python-setuptools graphviz plotutils librsvg2-bin" Does that help? https://github.com/wernight/scruffy-server/blob/master/README.md

@tdgunes
Copy link
Author

tdgunes commented Sep 28, 2018

Sorry, but I am still having the same plot.

@parrt
Copy link
Owner

parrt commented Sep 28, 2018

hm...did you uninstall then reinstall all that crap? i'll try spinning up a linux box soon

@tdgunes
Copy link
Author

tdgunes commented Sep 28, 2018

I have just created a bug report to Ubuntu. For some reason, graphviz debian packages are compiled with --without-rsvg. I made a request to change it. As far as I understand from their package definitions, there shouldn't be any problem with latest Debian and Fedora installations, which the flag is enabled as default.

Also, for eager Ubuntu users: there is a discussion in Japanese I found here, talks about how to recompile graphviz .deb package with rsvg flag for Ubuntu. I have not tried it yet.

@somous-jhzhao
Copy link

I have the same problem on windows 10. Did anyone solved this problem?

@parrt
Copy link
Owner

parrt commented Sep 29, 2018

I'm going to solve this by avoiding need to import svg. See my latest comments here parrt/AniML-java#1

@parrt
Copy link
Owner

parrt commented Sep 30, 2018

Can you do me a favor check if dot -Tsvg:cairo t.dot > t.svg works on some t.dot like

digraph G { A -> B }

?? I hope it works to generate svg via cairo even if it can't read. @tdgunes
thanks!

@parrt
Copy link
Owner

parrt commented Sep 30, 2018

Unfortunately from that link by @tdgunes It looks like -Tsvg:cairo also won't work. damn!

can you guys verify at least that dot -Tsvg works?

@BashfulBandit
Copy link

BashfulBandit commented Sep 30, 2018

@parrt I have already contacted the Debian package maintainer for the graphviz package. He has already changed the packaging to include librsvg. It is now available in Debian Buster.

@tdgunes

@KienVu2368
Copy link

KienVu2368 commented Sep 30, 2018

@BashfulBandit can I install this graphviz version in Ubuntu to avoid error?

@BashfulBandit
Copy link

@KienVu2368 Ubuntu is based off of Debian and uses the same package manager as Debian, so at some point, yes. I don't know how exactly Ubuntu and Debian packages work together though, so I don't know when Ubuntu will be using Debian Buster packages.

@BashfulBandit
Copy link

@KienVu2368 I should have also mentioned. If you want a OS which currently installs graphviz properly. Fedora currently packages graphviz with the librsvg dependency correctly and will work by just simply installing graphviz.

@parrt
Copy link
Owner

parrt commented Sep 30, 2018

Thanks for the help folks. The saga continues.

@parrt
Copy link
Owner

parrt commented Sep 30, 2018

Ok, dot -Tsvg t.dot > t.svg just worked for me on ubuntu with sudo apt install graphviz. It has embedded image refs to local dir. my embedding code should solve the rest of the issues.

unzip that and run dot. open t.svg and it should show good images.

lll.zip

@parrt
Copy link
Owner

parrt commented Oct 2, 2018

Making progress. Standby.

@parrt
Copy link
Owner

parrt commented Oct 2, 2018

Ok, i have linux and windows working outside of jupyter lab.

@parrt
Copy link
Owner

parrt commented Oct 2, 2018

Fixed by #10

Please note @tdgunes @BashfulBandit @KienVu2368 @somous-jhzhao

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

No branches or pull requests

5 participants