0

So I have been trying to install the graph-tool module on my Ubuntu system all day now. I just cant seem to figure it out. Basically I want to use the package in jupyter notebook (in an anaconda enviroment). I followed several installation instructions, but nothing seems to work.

This for example: https://gist.github.com/dlozeve/ed59bba8bc8cb9b21e2af36cc9766938

I get to the configuration (adjusting for the fact that I am using python2.7),

./configure --prefix=/home/timo/anaconda2/envs/graph/ --with-python-module-path=/usr/local/lib/python2.7/site-packages

yielding:

configure: error: *** A compiler with support for C++14 language features is required.

Does anyone know what I might be doing wrong? Or as a simpler way to get graph-tool to work in my jupyter notebook?

Thank you very much!

user142040
  • 53
  • 6

2 Answers2

0

The configure script is telling you exactly what is wrong: You need a compiler with C++14 support. This just means that your GCC is too old.

(You haven't told us any pertinent detail, such as the compiler version you have, library versions, etc, so we can only guess. But luckily, the configure diagnostics is crystal clear.)

A simpler way to install graph-tool would be for you to upgrade your distro (14.04 is outdated) and use the Ubuntu packages, as described here: https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#debian-ubuntu

Tiago Peixoto
  • 5,149
  • 2
  • 28
  • 28
  • I did install the newest GCC. However I upgraded to 16.04 LTS and managed to install graph-tool as explained in the instruction, but I am still not able to use the package in a jupyter notebook. Do I have to install it for Anaconda separately again? – user142040 Nov 01 '17 at 12:12
  • You're missing the point. The newest GCC in Ubuntu 14.04 is 4.8, which does not have sufficient C++14 support. This version is Ubuntu is too old, as I said. – Tiago Peixoto Nov 01 '17 at 12:17
  • You have to install jupyter using the Ubuntu package manager. Anaconda's Python does not see the modules installed by the system. – Tiago Peixoto Nov 01 '17 at 12:19
  • I see. I did install it via `pip install jupyter`. If I then start `jupyter notebook` and try to import `from graph_tool.all import * ` I still get `ImportError: No module named graph_tool.all`. – user142040 Nov 01 '17 at 12:29
  • The system package manager in Ubuntu is apt (e.g. apt-get, etc), not pip. – Tiago Peixoto Nov 01 '17 at 12:31
  • Yeah but apt does not find it. So I did it kinda like in the first steps here [https://www.rosehosting.com/blog/how-to-install-jupyter-on-an-ubuntu-16-04-vps/]. My `python --version` however still shows `Python 2.7.14 :: Anaconda, Inc.`. – user142040 Nov 01 '17 at 12:42
  • `jupyter-notebook` is only available from zesty and newer. It was called `ipython-notebook` in older versions (like 16.04). Please do your homework. And as already explained: When python is installed using anaconda, it does not interact with modules installed by the system. – Tiago Peixoto Nov 01 '17 at 12:47
  • I do have jupyter installed though. The problem seems to be, that it still tries to start from anaconda. – user142040 Nov 01 '17 at 13:06
  • Thank you very much for your efforts though! I do appreciate it. – user142040 Nov 01 '17 at 15:53
0

As graph-tool does not seems to run in an anaconda environment and Ubuntu 14.04 does not have support the latest C++ compiler that is needed, I did install Ubuntu 16.04 and followed firstly [https://www.google.de/amp/s/www.rosehosting.com/blog/how-to-install-jupyter-on-an-ubuntu-16-04-vps/amp/] and then finally installed graph-tool as described on the homepage.

This way I get to use jupyter notebook and am still able to import graph-tool.

user142040
  • 53
  • 6