MacOS: Error: invalid option: --with-librsvg
EricCacciavillani opened this issue · comments
First off thank you for creating the dependency it looks incredible to use.
But sadly I cant seem to install graphiz. Following the instructions for issue #23 I am confused with what I am supposed to do:
1.) I have xcode-select installed
2.) I ran "sudo xcodebuild -license" from the command-line (I dont understand why...just to confirm I got it I guess.)
3.) I run "brew uninstall graphviz"
4.) then finally run "brew install graphviz --with-librsvg --with-pango" in command-line
Then I get the following error
Error: invalid option: --with-librsvg
Thank you in advance for any help.
That's weird. What version of OS X and brew (brew --version
)?
hmm... yeah,Those options for the libraries are on the package. when I asked for information I get the following:
$ brew info graphviz
graphviz: stable 2.40.1 (bottled), HEAD
Graph visualization software from AT&T and Bell Labs
https://www.graphviz.org/
/usr/local/Cellar/graphviz/2.40.1 (504 files, 11.3MB) *
Built from source on 2018-12-06 at 14:22:07 with: --with-librsvg --with-pango
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/graphviz.rb
==> Dependencies
Build: pkg-config ✔
Required: gd ✔, gts ✘, libpng ✘, libtool ✔
==> Options
wow. I get the error myself now. wth?! something has changed. This page seems to show that the option is valid but it's not working anymore:
https://formulae.brew.sh/formula/graphviz
it doesn't like the pango one either. crap.
well, crap. It appears they have removed the options. see here https://github.com/Homebrew/homebrew-core/blob/master/Formula/graphviz.rb
I can't even install it myself at the moment!!! damn!
Dude that sucks! I am really sorry to hear that...well in the meantime, I can just try running it on my ubuntu machine.
no biggie :) So svg comes out of linux no problem?
On my other mac, i see:
$ brew info graphviz
graphviz: stable 2.40.1 (bottled), HEAD
Graph visualization software from AT&T and Bell Labs
https://www.graphviz.org/
/usr/local/Cellar/graphviz/2.40.1 (526 files, 12.3MB) *
Built from source on 2018-09-30 at 19:11:42 with: --with-app --with-pango --with-librsvg
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/graphviz.rb
==> Dependencies
Build: pkg-config ✔
Required: gd ✔, gts ✘, libpng ✘, libtool ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 22,513 (30 days), 67,031 (90 days), 267,583 (365 days)
install_on_request: 15,095 (30 days), 44,379 (90 days), 175,990 (365 days)
build_error: 0 (30 days)
Ok, so a diff of graphviz.rb shows they deleted these:
option "with-app", "Build GraphViz.app (requires full XCode install)"
option "with-gts", "Build with GNU GTS support (required by prism)"
option "with-pango", "Build with Pango/Cairo for alternate PDF output"
...
depends_on "gts" => :optional
depends_on "librsvg" => :optional
depends_on "pango" => :optional
Ok, so the bastards decided those options are bad universally as they require it to be built from source: Homebrew/homebrew-core#31510
@EricCacciavillani glad it's kinda working. yeah, int only class targets.
I can work with that. I admit I want to work with floats at times for my data, but then again binning is a thing and provides less overall noise in the dataset. So this will work for a majority of my datasets and dts but not all;(like 95% of the time this will be awesome) which again is still fantastic
Thanks so much for your time. I will be suggesting this to other data scientists I know. (Most of em have a Ubuntu machine so this will work well for them. Hopefully, you find a way to fix the mac problem but it does seem like its going to be a living nightmare...like just why....)
Ok, try this:
brew uninstall graphviz
brew upgrade pango librsvg
cd /tmp
wget https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz
tar xvfz graphviz.tar.gz
cd graphviz-2.40.1/
rm -rf /usr/local/lib/graphviz # in case old stuff is there
./configure --includedir=/usr/local/include/graphviz
make -j 8 # 8 threads
make install
make sure it's using /usr/local/bin/dot not, for example, /Users/parrt/anaconda3/bin/dot
Try dot -Tsvg:cairo
from command line.
I will give this a try in a tiny bit sorry was finishing up a presentation. Really sorry....also I am an idiot I thought you wanted the matrix to be ints only...thank god that isnt the case...I really need to sleep more...
dot -Tsvg:cairo isn't showing up....but I did everything else going to spin up a JuypterLab to see if this works...fingers crossed!
Again terribly sorry I got sidetracked that was incredibly rude to you.
Damn! is the date on that dot
when you installed it? And no errors from make or make install?
Didn't look like any errors happened. I dont understand what you mean by the "date of that dot".
meaning timestamp ls -l /usr/local/bin/dot
. i found an old one that didn't get overwritten earlier.
dang it! if it builds, this really should work. grrr....does your configure help show this:
$ ./configure --help|grep svg
--with-rsvg=yes rsvg library
$ ./configure --help|grep cairo
--with-pangocairo=yes pangocairo library
the --
is confusing grep. can you gry just the svg and cairo bits with grep like I did? thanks!
yup. ok, soooo weird. ok, let me try on a few other macs and let you know. i've reopened :) thanks much for the help.
No problem I will keep revisiting for any updates.
@EricCacciavillani Can you verify that it is linking to the correct dot
with:
ls -l $(which dot)
It should be:
$ ls -l $(which dot)
-rwxr-xr-x 1 parrt wheel 22920 Feb 5 09:02 /usr/local/bin/dot*
and NOT:
$ ls -l $(which dot)
lrwxr-xr-x 1 parrt wheel 33 Feb 4 19:54 /usr/local/bin/dot@ -> ../Cellar/graphviz/2.40.1/bin/dot
dang. I tried that sequence on a 3rd mac and it worked well.
How about doing a make uninstall
from that build dir then make sure dot
command says not found. Then do make install
again (no need to clean and remake). Try dot -Tsvg:cairo
again.
ok, that is really weird. only random thought. maybe there is an alias in the shell. try /usr/local/bin/dot -Tsvg:cairo
?
rats! Hmm....ok, i'll wait to hear reports from others. maybe I'll try on another random mac. thanks!
No problem thanks again!
Wow still no one else dam....guess it's just me lol
Np I'll live! I still got my Ubuntu machine! :3
ok, cool. i'll close for now.
I have this same issue.
have tried all of the steps posted here so far.
Have you tried what's on the home page?
brew uninstall graphviz
brew reinstall pango librsvg # even if already there, please reinstall
cd /tmp
wget https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz
tar xvfz graphviz.tar.gz
cd graphviz-2.40.1/
rm -rf /usr/local/lib/graphviz # in case old stuff is there
# make sure to run ./configure after reinstalling pango, librsvg
./configure --includedir=/usr/local/include/graphviz
make -j 8 # 8 threads
make install
I had to pass the --with-pangocairo=yes
switch to the configure script. Without it, graphviz would compile without cairo support
./configure --includedir=/usr/local/include/graphviz --with-pangocairo=yes
wow. really? Ok, I am adding to the readme. Thank you
@pingwhistle 's suggestion worked for me as well :D
Hi there. I got the same error and I also tried all steps posted here. Here is my last actions:
brew uninstall graphviz # it gives me an error No such keg: /usr/local/Cellar/graphviz
brew reinstall pango librsvg
cd /tmp
wget https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz
tar xvfz graphviz.tar.gz
cd graphviz-2.40.1/
rm -rf /usr/local/lib/graphviz
./configure --includedir=/usr/local/include/graphviz --with-pangocairo=yes
make -j 8 # 8 threads
make install
Then I run
dot -Tsvg:cairo
And got
Format: "svg:cairo" not recognized. Use one of: svg:svg:core
My mac data:
iMac (21.5-inch, Late 2012)
MacOS Mojave
Thanks.
Thanks. we need to know WHICH dot
is running though. What does which dot
say?
Thanks for attention. which dot
says:
/usr/local/bin/dot
Hmm...that's correct. does ls -l /usr/local/bin/dot
show your installation date? and also try rm ~/anaconda3/bin/dot
just to be sure.
Command ls -l /usr/local/bin/dot
says:
-rwxr-xr-x 1 mac admin 22920 21 мар 18:18 /usr/local/bin/dot
and then rm ~/anaconda3/bin/dot
:
rm: /Users/mac/anaconda3/bin/dot: No such file or directory
Dang. I'm at a loss I'm afraid. :(
Same problem here.
$ dot -Tsvg:cairo
Format: "svg:cairo" not recognized. Use one of: svg:svg:core
$ ls -al /usr/local/bin/dot
-rwxr-xr-x 1 kaonpark admin 22976 Apr 3 21:46 /usr/local/bin/dot
I have encountered a suspicious message before:
$ ./configure --includedir=/usr/local/include/graphviz --with-pangocairo=yes
...
checking for PANGOCAIRO... no
...
lasi: No (missing pangocairo support)
ming: No (disabled by default - incomplete)
pangocairo: No (pangocairo library not available)
...
I am also facing such an issue.
Running this:
./configure --includedir=/usr/local/include/graphviz --with-pangocairo=yes
I noticed that:
graphviz-2.40.1 will be compiled with the following:
...
...
plugin libraries:
dot_layout: Yes (always enabled)
neato_layout: Yes (always enabled)
core: Yes (always enabled)
devil: No (missing library)
gd: Yes
gdiplus: No (disabled by default - Windows only)
gdk:
gdk_pixbuf: No (gdk_pixbuf library not available)
ghostscript: No (missing Xrender)
glitz: No (disabled by default - incomplete)
gtk: No (gtk library not available)
lasi: No (missing pangocairo support)
ming: No (disabled by default - incomplete)
pangocairo: No (pangocairo library not available)
poppler: No (poppler library not available)
quartz: No (disabled by default - Mac only)
rsvg: No (rsvg library not available)
visio: No (disabled by default - experimental)
webp: No (disabled by default - experimental)
xlib: Yes
In particular: pangocairo: No (pangocairo library not available)
How can I get the pangocairo library?
Can't seem to find much information on the web, this seems like the most relevant and active thread around.
Hope we can resolve this issue soon!
Hi. We have a potential solution but I haven't checked it yet: #36 Can you try it?
Hi all,
Hope this helps in some way.
It appears that svg:cairo is no longer supported on 10.14. I hear is what I did at home. I also tested on Windows 10:
brew uninstall graphviz
brew reinstall pango librsvg --build-from-source # even if already there, please reinstall
brew reinstall cairo --build-from-source
brew install graphviz --build-from-source
Then updated trees.py to only use dot -Tsvg, as per the pull request. This however, does not solve the original font calculation problems that cairo solved, so some minor tweaks to this branch are needed.
You can also see what I had to do on Windows 10:
- If you are having issues with run command you can try copying the following files from: https://github.com/xflr6/graphviz/tree/master/graphviz.
- Place them in the
AppData\Local\Continuum\anaconda3\Lib\site-packages\graphviz\site-packages\graphviz folder
. - Clean out the
__pycache__
directory too.
@lutaev @likejazz @breadplop are you folks on 10.13 or 10.14 os x?
@parrt I have the exact same issue I am running 10.14 followed the last pull request but no luck
Rats! Maybe @gautamkarnik, who has 10.14, can figure this out.
Just got this working on a student's laptop. All i did was the preamble:
conda uninstall python-graphviz
conda uninstall graphviz
pip install dtreeviz
and then the os x instructions. works great on 10.13.
Fixed by b655c62