Skip to content

Instantly share code, notes, and snippets.

@tldev-de
Last active January 22, 2019 19:27
Show Gist options
  • Save tldev-de/883737ad0836edda11e9cc0a06c0d5f1 to your computer and use it in GitHub Desktop.
Save tldev-de/883737ad0836edda11e9cc0a06c0d5f1 to your computer and use it in GitHub Desktop.
How to install graph_tool on Ubuntu 16.04 Xenial

How to install graph_tool on Ubuntu 16.04 Xenial

Problem Description

This is because, in reality, graph-tool is a C++ library wrapped in Python, and it has many C++ dependencies such as Boost, CGAL and expat, which are not installable via Python-only package management systems such as pip. Because the module lives between the C++ and Python worlds, its installation is done more like a C++ library rather than a typical python module. https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#native-installation

add public key to verify the packages

sudo apt-key adv --keyserver pgp.skewed.de --recv-key 612DEFB798507F25

add the repository to apt

echo "deb http://downloads.skewed.de/apt/xenial xenial universe" | sudo tee -a /etc/apt/sources.list.d/graph_tool.list
echo "deb-src http://downloads.skewed.de/apt/xenial xenial universe" | sudo tee -a /etc/apt/sources.list.d/graph_tool.list

install additional dependencies

sudo apt update && sudo apt install virtualenv expat libsparsehash-dev libboost-all-dev graphviz build-essential libcairo2-dev gfortran libopenblas-dev liblapack-dev libcgal-dev python3-dev

install python3-graph-tool

sudo apt install python3-graph-tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment