2016-12-11 122 views
1

我最近将Ubuntu从14.04升级到16.04,我在使用python igraph(在anaconda上)时出现了一些奇怪的问题。 14.04我没有任何问题。Ubuntu上的python igraph导入错误16.04

具体 - PIP安装python-的igraph似乎工作:

Collecting python-igraph 
Installing collected packages: python-igraph 
Successfully installed python-igraph-0.7.1.post6 

但是,试图导入的igraph(在IPython中关于Python 2.7.12 |蟒蛇4.2.0(64位),我得到以下:

ImportError        Traceback (most recent call last) 
<ipython-input-3-8e950eb5d8d8> in <module>() 
----> 1 import igraph 

/home/scifric/anaconda2/lib/python2.7/site-packages/igraph/__init__.py in <module>() 
    32 # pylint: disable-msg=W0401 
    33 # W0401: wildcard import 
---> 34 from igraph._igraph import * 
    35 from igraph._igraph import __version__, __build_date__ 
    36 from igraph.clustering import * 

ImportError: /home/scifric/anaconda2/lib/python2.7/site-  ackages/igraph/_igraph.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev 

我看到一些线程在Linux上拱或OSX类似的问题,并没有解决方案,似乎适合 任何想法,缺什么

临屋? NKS!

回答

3

安装/重新安装/卸载/蟒蛇的igraph的重新编译和产生挫折的C核心库后,这里是什么工作: 我卸载蟒蛇-的igraph都与PIP和畅达 我删除了所有的igraph目录中搜索所有后(cd/sudo find -name igraph)。 现在,这里是一个神奇的感谢陶Nepusz(@ntamas): 只需安装预编译的二进制包蟒蛇的Python:

conda install -c marufr python-igraph=0.7.1.post6 

从这里取:https://anaconda.org/marufr/python-igraph

就是这么的简单。 (但是我仍然对python igraph和我以前经历的c库之间的冲突感到困惑,至少noe我有它的工作)。