Search code examples
macospython-3.6cairo

Install graph-tool on Mac OS, graph drawing issue


In the end, created an env to install graph-tool thru the channel vgauthier.

Thinking by now that I might have as well used earlier version of python or installed a whole new python latest version just for this.

But as it is all part of the learning process to creating dev. env.. (at the same time worrying my Mac has too many installations with much too interlinked dependencies)

Someone kindly let me know if this rings any bell or got any suggestion: Incompatible library version states that _cairo.cpython-36m-darwin.so requires later version of libcairo.2.dylib.

enter image description here


Solution

  • Errors could have been from:

    1. having on .condarc file, wrong priorities btw channels, so having trouble finding the right files (modified to the order of conda-forge > ~dir/vgauthier > default
    2. my having given up on installing pygobject after googling it is not supported on Mac OS (which was apparently wrong or I just wasnt searching well)

    Solution to easy setup of graph-tool for conda-installed python users:

    • Get the benefit of GUI (seriously a god option) ->

    https://medium.com/@ronie/installing-graph-tool-for-python-3-on-anaconda-3f76d9004979

    • To still continue with command line (still get the idea from GUI) conda install -c pkgw-forge gtk3 conda install -c https://conda.anaconda.org/fallen pygobject (if there are cairo blah blah missing, look up setup directions for igraph which has more information and help, having been an older library)

    Do these before installing graph-tool, which Im still wondering why I cannot remove from the system though. ;)

    For others, https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#compiler-choice-in-macos-x