Search code examples
pythonpython-2.7anacondagraph-tool

Can no longer import graph-tool after installing anaconda


I have installed graph-tool on ubuntu for python2.7 which worked. I have subsequently installed Anaconda. When I now try running from graph_tool.all import * from within python I receive the message ImportError: No module named graph_tool.all. I have then uninstalled graph-tool again and tried reinstalling it but to no avail. I still receive the error ImportError: No module named graph_tool.all. Does anybody know what the problem might be here? I have used the pre-compiled trusty distribution.

If I run /usr/bin/python I can load graph-tool as normal.

I have also found this post (Anaconda Python: How to install missing dependency?). Will that give me the official graph-tool version?


Solution

  • This website gives quite detailed instructions on how to compile graph-tool from source so that it works with Anaconda's Python: https://gist.github.com/v-pravin/949fc18d58a560cf85d2