|
|
`graph-tool` can be installed either via a package manager, or by manual compilation. The easiest method is via a package manager. See below a list of options for different operating systems.
|
|
|
# How to install graph-tool
|
|
|
|
|
|
Note that although graph-tool is a Python library, it is implemented in C++, and thus has C++ dependencies such as [Boost](http://www.boost.org/), [CGAL](http://www.cgal.org/) and [expat](http://expat.sourceforge.net/), which are not instalable via Python-only package management systems such as [pip](http://www.pip-installer.org/). Because of this, its installation is done more like a C++ library rather than a typical python module.
|
|
|
## Friendly warning
|
|
|
|
|
|
Python modules are usually very easy to install, typically requiring nothing more that `pip install <package>` for basically any operating system. For `graph-tool`, however, the situation is different. This is because, in reality, `graph-tool` is a C++ library wrapped in Python, and it has many C++ dependencies such as [Boost](http://www.boost.org/), [CGAL](http://www.cgal.org/) and [expat](http://expat.sourceforge.net/), which are not installable via Python-only package management systems such as [pip](http://www.pip-installer.org/). 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. This means it inherits some of the complexities common of the C++ world that some Python users do not expect.
|
|
|
|
|
|
The easiest way to get going is to use a package manager, for which the installation is fairly straightforward. This is the case for some GNU/Linux distributions (Arch, Gentoo, Debian & Ubuntu) as well as for MacOS users using either [Macports](http://www.macports.org/) or [Homebrew](http://brew.sh/).
|
|
|
|
|
|
Alternatively, `graph-tool` can be installed from source, by manual compilation. The module uses the standard [GNU build system](https://en.wikipedia.org/wiki/GNU_Build_System) for this (i.e. `./configure; make; make install`), and users wishing to go on this route are recommended to familiarize themselves with it. An in-depth resource is the [Autotools Mythbuster](https://autotools.io/index.html).
|
|
|
|
|
|
# GNU/Linux
|
|
|
|
... | ... | |