I tried to install the package igraph on Anaconda but so far it did not work. If anyone find a way to get it, I would be very happy to try it !! Below are some details of what I tried to do (if you have the solution of installing igraph on Anaconda, you don't have to read it!).
I'm on MAC OS X Yosemite (MAC book Pro 2,3 GHz Intel Core i7). Here are some configuration parameters: MBP-de-Lecue:site-packages lecueguillaume$ which python /Users/lecueguillaume/anaconda/bin/python MBP-de-Lecue:site-packages lecueguillaume$ which pip /Users/lecueguillaume/anaconda/bin/pip
igraph is supposed to be installed via pip. Since, when I typed pip list, I can see the package igraph in the list
python-igraph (0.7)
But when I try to import igraph here is what I get:
MBP-de-Lecue:site-packages lecueguillaume$ python Python 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
import igraph Traceback (most recent call last): File "", line 1, in File "build/bdist.macosx-10.5-x86_64/egg/igraph/init.py", line 34, in
File "build/bdist.macosx-10.5-x86_64/egg/igraph/_igraph.py", line 7, in File "build/bdist.macosx-10.5-x86_64/egg/igraph/_igraph.py", line 6, in bootstrap ImportError: dlopen(/Users/lecueguillaume/.python-eggs/python_igraph-0.7-py2.7-macosx-10.5-x86_64.egg-tmp/igraph/_igraph.so, 2): Library not loaded: libxml2.2.dylib Referenced from: /Users/lecueguillaume/.python-eggs/python_igraph-0.7-py2.7-macosx-10.5-x86_64.egg-tmp/igraph/_igraph.so Reason: Incompatible library version: _igraph.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
So the problem comes from libxml2-2. I tried to upgrade libxml with brew: MBP-de-Lecue:site-packages lecueguillaume$ brew upgrade libxml2 Error: libxml2-2.9.2 already installed
1) The first thing that I don't get is that libxml2.2 version 12.0.0 does not seem to exist. The latest version on http://xmlsoft.org is 9.2. So why igraph is asking for version 12.0 ? (I certainly missed something).
The fact that brew does not help is because it does not update the right libxml: MBP-de-Lecue:site-packages lecueguillaume$ which brew /usr/local/bin/brew
2) How can I say to brew to update the Anaconda libxml library in anaconda/pkgs
3) I also tried to install graph with conda pipbuild python-igraph. Everything went well : Successfully installed python-igraph Except that it had to install the C Core of igraph by itself whereas I already installed it: Installing collected packages: python-igraph Running setup.py install for python-igraph Cannot find the C core of igraph on this system using pkg-config. We will now try to download and compile the C core from scratch. Version number of the C core: 0.7 We will also try: 0.7.0
So it looks like the conda installation worked well but the "import igraph" still does not work.
4) Finally, when I use the built-in MAC version of python, igraph works well: MBP-de-Lecue:site-packages lecueguillaume$ which python2.7 /opt/local/bin/python2.7 MBP-de-Lecue:site-packages lecueguillaume$ python2.7 Python 2.7.8 (default, Jul 13 2014, 17:11:32) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import igraph
So igraph was well installed in the MAC version of python but not in the Anaconda version. Since I use Anaconda Notebook (which works wit Anaconda python), I would like to have igraph installed on it.
Sorry for the long question (this is the first time I asked a question). I have the very same problem with the package graphviz (installed on MAC python2.7 version but not on Anaconda python's version).
Many thanks in advance for any help !
Guillaume.