Giter Club home page Giter Club logo

Comments (58)

parrt avatar parrt commented on May 15, 2024 8

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.

likejazz avatar likejazz commented on May 15, 2024 5

@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.

pingwhistle avatar pingwhistle commented on May 15, 2024 1

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.

parrt avatar parrt commented on May 15, 2024

That's weird. What version of OS X and brew (brew --version)?

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

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...)
image

Also thanks for the help! Tried it with each one of the given options to see if I could get anything working...

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

no biggie :) So svg comes out of linux no problem?

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

image
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.

parrt avatar parrt commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

@EricCacciavillani glad it's kinda working. yeah, int only class targets.

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

Yeah no getting the following errors.....
image

image

So what do I need to put in my system paths for this then???

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

Damn! is the date on that dot when you installed it? And no errors from make or make install?

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

Didn't look like any errors happened. I dont understand what you mean by the "date of that dot".

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

meaning timestamp ls -l /usr/local/bin/dot. i found an old one that didn't get overwritten earlier.

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

image
Oh....

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

Nope errors
image

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

the -- is confusing grep. can you gry just the svg and cairo bits with grep like I did? thanks!

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

image
this?

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

No problem I will keep revisiting for any updates.

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

@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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

image

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

Make uninstall did get rid of dot. Re-install brought it back. Still get an error tho.
image

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

image

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

rats! Hmm....ok, i'll wait to hear reports from others. maybe I'll try on another random mac. thanks!

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

No problem thanks again!

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

Wow still no one else dam....guess it's just me lol

from dtreeviz.

EricCacciavillani avatar EricCacciavillani commented on May 15, 2024

Np I'll live! I still got my Ubuntu machine! :3

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

ok, cool. i'll close for now.

from dtreeviz.

bminahan73 avatar bminahan73 commented on May 15, 2024

I have this same issue.

from dtreeviz.

bminahan73 avatar bminahan73 commented on May 15, 2024

have tried all of the steps posted here so far.

from dtreeviz.

bminahan73 avatar bminahan73 commented on May 15, 2024

screen shot 2019-03-03 at 12 18 00 pm

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

wow. really? Ok, I am adding to the readme. Thank you

from dtreeviz.

bminahan73 avatar bminahan73 commented on May 15, 2024

@pingwhistle 's suggestion worked for me as well :D

from dtreeviz.

lutaev avatar lutaev commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

Thanks. we need to know WHICH dot is running though. What does which dot say?

from dtreeviz.

lutaev avatar lutaev commented on May 15, 2024

Thanks for attention. which dot says:

/usr/local/bin/dot

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

lutaev avatar lutaev commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

Dang. I'm at a loss I'm afraid. :(

from dtreeviz.

likejazz avatar likejazz commented on May 15, 2024

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.

breadplop avatar breadplop commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

Hi. We have a potential solution but I haven't checked it yet: #36 Can you try it?

from dtreeviz.

gautamkarnik avatar gautamkarnik commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

@lutaev @likejazz @breadplop are you folks on 10.13 or 10.14 os x?

from dtreeviz.

angelo-moreira avatar angelo-moreira commented on May 15, 2024

@parrt I have the exact same issue I am running 10.14 followed the last pull request but no luck

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

Rats! Maybe @gautamkarnik, who has 10.14, can figure this out.

from dtreeviz.

parrt avatar parrt commented on May 15, 2024

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.

parrt avatar parrt commented on May 15, 2024

Fixed by b655c62

from dtreeviz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.