Comments (58)
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
from dtreeviz.
@parrt I used to OS X 10.14 and still failed to install graphviz. but I've tried #36 and it works now!
from dtreeviz.
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
from dtreeviz.
That's weird. What version of OS X and brew (brew --version
)?
from dtreeviz.
Homebrew 2.0.0 Homebrew/homebrew-core (git revision bf83; last commit 2019-02-04)
Some more context. (I don't see the options for what you specified...)
Also thanks for the help! Tried it with each one of the given options to see if I could get anything working...
from dtreeviz.
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.
from dtreeviz.
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!
from dtreeviz.
Dude that sucks! I am really sorry to hear that...well in the meantime, I can just try running it on my ubuntu machine.
from dtreeviz.
no biggie :) So svg comes out of linux no problem?
from dtreeviz.
Dude this is actually amazing...like seriously...
(I need to fix that legend tho. But it seems like I need to convert all floats to ints to get it to work)
from dtreeviz.
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
from dtreeviz.
@EricCacciavillani glad it's kinda working. yeah, int only class targets.
from dtreeviz.
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....)
from dtreeviz.
make sure it's using /usr/local/bin/dot not, for example, /Users/parrt/anaconda3/bin/dot
Try dot -Tsvg:cairo
from command line.
from dtreeviz.
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.
from dtreeviz.
Yeah no getting the following errors.....
So what do I need to put in my system paths for this then???
from dtreeviz.
Damn! is the date on that dot
when you installed it? And no errors from make or make install?
from dtreeviz.
Didn't look like any errors happened. I dont understand what you mean by the "date of that dot".
from dtreeviz.
meaning timestamp ls -l /usr/local/bin/dot
. i found an old one that didn't get overwritten earlier.
from dtreeviz.
from dtreeviz.
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
from dtreeviz.
from dtreeviz.
the --
is confusing grep. can you gry just the svg and cairo bits with grep like I did? thanks!
from dtreeviz.
from dtreeviz.
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.
from dtreeviz.
No problem I will keep revisiting for any updates.
from dtreeviz.
@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
from dtreeviz.
from dtreeviz.
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.
from dtreeviz.
Make uninstall did get rid of dot. Re-install brought it back. Still get an error tho.
from dtreeviz.
ok, that is really weird. only random thought. maybe there is an alias in the shell. try /usr/local/bin/dot -Tsvg:cairo
?
from dtreeviz.
from dtreeviz.
rats! Hmm....ok, i'll wait to hear reports from others. maybe I'll try on another random mac. thanks!
from dtreeviz.
No problem thanks again!
from dtreeviz.
Wow still no one else dam....guess it's just me lol
from dtreeviz.
Np I'll live! I still got my Ubuntu machine! :3
from dtreeviz.
ok, cool. i'll close for now.
from dtreeviz.
I have this same issue.
from dtreeviz.
have tried all of the steps posted here so far.
from dtreeviz.
from dtreeviz.
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
from dtreeviz.
wow. really? Ok, I am adding to the readme. Thank you
from dtreeviz.
@pingwhistle 's suggestion worked for me as well :D
from dtreeviz.
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.
from dtreeviz.
Thanks. we need to know WHICH dot
is running though. What does which dot
say?
from dtreeviz.
Thanks for attention. which dot
says:
/usr/local/bin/dot
from dtreeviz.
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.
from dtreeviz.
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
from dtreeviz.
Dang. I'm at a loss I'm afraid. :(
from dtreeviz.
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)
...
from dtreeviz.
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!
from dtreeviz.
Hi. We have a potential solution but I haven't checked it yet: #36 Can you try it?
from dtreeviz.
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.
from dtreeviz.
@lutaev @likejazz @breadplop are you folks on 10.13 or 10.14 os x?
from dtreeviz.
@parrt I have the exact same issue I am running 10.14 followed the last pull request but no luck
from dtreeviz.
Rats! Maybe @gautamkarnik, who has 10.14, can figure this out.
from dtreeviz.
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.
from dtreeviz.
Fixed by b655c62
from dtreeviz.
Related Issues (20)
- Add support for TensorFlow GradientBoostedTreesModel model
- _regr_leaf_viz calculates the mean for prediction value.
- WARNING:matplotlib.font_manager:findfont: Font family 'Arial' not found. HOT 2
- Decision Tree visualize wrong path HOT 1
- When using dataset that is different from the training for trees models - does not draw HOT 1
- Support for RandomForest HOT 5
- Visualize custom decision tree HOT 1
- how to use dtreeviz in streamlit HOT 2
- VisualisationNotYetSupportedError: get_min_samples_leaf() is not implemented yet for XGBoost. HOT 4
- TypeError: list indices must be integers or slices, not numpy.float64 HOT 5
- Crash when leaf nodes have no samples HOT 1
- Out of memory when calling viz.view() HOT 2
- Integrate AI explanation
- CatBoost need to be supported. HOT 1
- AttributeError: module 'dtreeviz' has no attribute 'model' on Windows platform, works fine on Google colab
- tfdf.keras.CartModel support? HOT 1
- TypeError: 'int' object is not subscriptable HOT 3
- Development requirement in `setup.py` HOT 1
- Adjust Bounding Box of saved svg file
- DTreeViz crashes, if descision tree was built with objects, that are interpretable as numbers.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dtreeviz.