Maybe the simplest way to install `graph-tool` is using the [Conda](https://conda.io) package manager for both GNU/Linux and MacOS, via [conda-forge](https://anaconda.org/conda-forge/graph-tool). The packages are binary, so no compilation is necessary. This mode of installation is particularly useful when a system-wide installation is not possible due to lack of permissions, e.g. in HPC environments, since conda allows for unprivileged installations in a home directory.
The easiest way to install `graph-tool` is to create a new environment and install it there:
```
conda create --name gt -c conda-forge graph-tool
conda activate gt
```
After that, install additional packages to the environment as needed:
You can also install `graph-tool` to a pre-existing environment with the following command,
but the solver is likely to fail (or hang) if your environment already contains many
packages already, whose dependencies may conflict with the `graph-tool` dependencies.
This is particularly likely if your environment contains packages from the official
`Anaconda` distribution, rather than the `conda-forge` distribution.
```
conda install -c conda-forge graph-tool
```
Note: Rather than specifying `-c conda-forge` on every command, you can add `conda-forge` to your channels with:
```
conda config --add channels conda-forge
```
It is possible to list all of the versions of `graph-tool` available for your platform with:
```
conda search graph-tool --channel conda-forge
```
If experiencing problems with the `conda` package, please open an issue at the [`conda-forge` github page](https://github.com/conda-forge/graph-tool-feedstock).
# Installing using Docker
# Installing using Docker
The most hands-off and OS-agnostic way to install `graph-tool` is using [Docker](https://www.docker.com/). If you have Docker installed, this can be done simply by running:
The most OS-agnostic way to install `graph-tool` is using [Docker](https://www.docker.com/). If you have Docker installed, this can be done simply by running:
```bash
```bash
docker pull tiagopeixoto/graph-tool
docker pull tiagopeixoto/graph-tool
```
```
...
@@ -53,7 +94,7 @@ and then start the notebook server
...
@@ -53,7 +94,7 @@ and then start the notebook server
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.
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](#gnulinux)(Arch, Gentoo, Debian & Ubuntu) as well as for [MacOS](#macos-x) users using either [Macports](http://www.macports.org/) or [Homebrew](http://brew.sh/). It is also possible to install it via [anaconda](https://anaconda.com) for both GNU/Linux and MacOS, through [conda-forge](https://conda-forge.org).
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](#gnulinux)(Arch, Gentoo, Debian & Ubuntu) as well as for [MacOS](#macos-x) users using either [Macports](http://www.macports.org/) or [Homebrew](http://brew.sh/). As discussed before, it is also possible to install it via [anaconda](https://anaconda.com) for both GNU/Linux and MacOS, through [conda-forge](https://conda-forge.org).
Alternatively, `graph-tool` can be installed from source, by [manual compilation](#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. [Basic instructions](#manual-compilation) are given below, and an in-depth resource is the [Autotools Mythbuster](https://autotools.io/index.html).
Alternatively, `graph-tool` can be installed from source, by [manual compilation](#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. [Basic instructions](#manual-compilation) are given below, and an in-depth resource is the [Autotools Mythbuster](https://autotools.io/index.html).
...
@@ -131,47 +172,6 @@ port install py-graph-tool
...
@@ -131,47 +172,6 @@ port install py-graph-tool
If you encounter an error installing graph-tool via Macports, please file a bug report to that project directly, not graph-tool: https://trac.macports.org/wiki/Tickets
If you encounter an error installing graph-tool via Macports, please file a bug report to that project directly, not graph-tool: https://trac.macports.org/wiki/Tickets
### Conda
It's possible to install `graph-tool` using the [Conda](https://conda.io) package manager for both GNU/Linux and MacOS, via [conda-forge](https://anaconda.org/conda-forge/graph-tool). The packages are binary, so no compilation is necessary. This mode of installation is particularly useful when a system-wide installation is not possible due to lack of permissions, e.g. in HPC environments, since conda allows for unprivileged installations in a home directory.
The easiest way to install `graph-tool` is to create a new environment and install it there:
```
conda create --name gt -c conda-forge graph-tool
conda activate gt
```
After that, install additional packages to the environment as needed:
You can also install `graph-tool` to a pre-existing environment with the following command,
but the solver is likely to fail (or hang) if your environment already contains many
packages already, whose dependencies may conflict with the `graph-tool` dependencies.
This is particularly likely if your environment contains packages from the official
`Anaconda` distribution, rather than the `conda-forge` distribution.
```
conda install -c conda-forge graph-tool
```
Note: Rather than specifying `-c conda-forge` on every command, you can add `conda-forge` to your channels with:
```
conda config --add channels conda-forge
```
It is possible to list all of the versions of `graph-tool` available for your platform with:
```
conda search graph-tool --channel conda-forge
```
If experiencing problems with the `conda` package, please open an issue at the [`conda-forge` github page](https://github.com/conda-forge/graph-tool-feedstock).
### Windows
### Windows
Fully native installation on windows is not supported, but two viable options are either to use [Docker](#installing-using-docker)(see[here](https://docs.docker.com/docker-for-windows/) for instructions), or the Ubuntu userspace for windows (more information [here](http://blog.dustinkirkland.com/2016/04/howto-ubuntu-on-windows.html) and [here](https://insights.ubuntu.com/2016/04/14/howto-ubuntu-on-windows-2/)), which allows the native Ubuntu packages to be installed as described [above](#debian-ubuntu).
Fully native installation on windows is not supported, but two viable options are either to use [Docker](#installing-using-docker)(see[here](https://docs.docker.com/docker-for-windows/) for instructions), or the Ubuntu userspace for windows (more information [here](http://blog.dustinkirkland.com/2016/04/howto-ubuntu-on-windows.html) and [here](https://insights.ubuntu.com/2016/04/14/howto-ubuntu-on-windows-2/)), which allows the native Ubuntu packages to be installed as described [above](#debian-ubuntu).